diff --git a/README.md b/README.md index 3f15015..3f95446 100644 --- a/README.md +++ b/README.md @@ -33,6 +33,13 @@ GitHub Action for creating Cloudflare Pages deployments, using the new [Direct U directory: YOUR_ASSET_DIRECTORY # Optional: Enable this if you want to have GitHub Deployments triggered gitHubToken: ${{ secrets.GITHUB_TOKEN }} + # Optional: Switch what branch you are publishing to. + # By default this will be the branch which triggered this workflow + branch: main + # Optional: Change the working directory + workingDirectory: my-site + # Optional: Change the Wrangler version, allows you to point to a specific version or a tag such as `beta` + wranglerVersion: '3' ``` 1. Replace `YOUR_ACCOUNT_ID`, `YOUR_PROJECT_NAME` and `YOUR_ASSET_DIRECTORY` with the appropriate values to your Pages project. @@ -69,6 +76,22 @@ manually by adding the argument `branch: YOUR_BRANCH_NAME`. By default Wrangler will run in the root package directory. If your app lives in a monorepo and you want to run Wrangler from its directory, add `workingDirectory: YOUR_PACKAGE_DIRECTORY`. +### Wrangler v3 + +You can use the newly released [Wrangler v3](https://blog.cloudflare.com/wrangler3/) with the `wranglerVersion` property. + +```yaml + - name: Publish to Cloudflare Pages + uses: cloudflare/pages-action@v1 + with: + apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }} + accountId: YOUR_ACCOUNT_ID + projectName: YOUR_PROJECT_NAME + directory: YOUR_ASSET_DIRECTORY + # Enable Wrangler v3 + wranglerVersion: '3' +``` + ## Outputs | Name | Description | diff --git a/action.yml b/action.yml index 7cd43f9..61e3f56 100644 --- a/action.yml +++ b/action.yml @@ -28,7 +28,7 @@ inputs: wranglerVersion: description: "The version of Wrangler to use" required: false - default: 2 + default: "2" runs: using: "node16" main: "index.js" diff --git a/package-lock.json b/package-lock.json index ecc2646..92bab55 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "pages-action", - "version": "1.3.0", + "version": "1.5.0", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "pages-action", - "version": "1.3.0", + "version": "1.5.0", "license": "MIT", "dependencies": { "@actions/core": "^1.10.0", diff --git a/package.json b/package.json index ed6804d..6c86547 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "pages-action", - "version": "1.3.0", + "version": "1.5.0", "description": "Publish to Cloudflare Pages", "main": "index.js", "scripts": {