@@ -56,17 +56,15 @@ jobs:
5656 run : yarn build
5757 - name : Publish to Cloudflare Pages
5858 # Id is needed to access output in a next step.
59- id : cloudflare
60- uses : cloudflare/pages -action@v1
59+ id : deploy
60+ uses : cloudflare/wrangler -action@v3
6161 with :
62+ # Token with Cloudflare Pages edit permission only generated in Cloudflare dashboard -> Manage Account -> Account API Tokens
6263 apiToken : ${{ secrets.CLOUDFLARE_PAGES_API_TOKEN }}
64+ # Acquired from Cloudflare dashboard -> Compute > Workers & Pages or dashboard url: https://dash.cloudflare.com/<account-id>/
6365 accountId : ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
64- # Project name created via Cloudflare dashboard.
65- projectName : oasis-wallet
66- # Use output directory of build command.
67- directory : build
68- branch : ${{ github.event_name == 'pull_request' && format('pr-{0}', github.event.pull_request.number) || '' }}
69- wranglerVersion : ' 3'
66+ # Project created via Cloudflare dashboard or CLI command "npx wrangler pages project create <project-name>"
67+ command : pages deploy ./build --project-name=oasis-wallet --branch ${{ github.event_name == 'pull_request' && format('pr-{0}', github.event.pull_request.number) || '' }}
7068 # On a subsequent run the original comment will be updated.
7169 - name : Update PR comment
7270 uses : mshick/add-pr-comment@v2
@@ -85,11 +83,11 @@ jobs:
8583 </tr>
8684 <tr>
8785 <td><strong>Preview URL:</strong></td>
88- <td><a href="${{ steps.cloudflare .outputs.url }}">${{ steps.cloudflare .outputs.url }}</a></td>
86+ <td><a href="${{ steps.deploy .outputs.deployment- url }}">${{ steps.deploy .outputs.deployment- url }}</a></td>
8987 </tr>
9088 <tr>
9189 <td><strong>Alias:</strong></td>
92- <td><a href="${{ steps.cloudflare .outputs.alias }}">${{ steps.cloudflare .outputs.alias }}</a></td>
90+ <td><a href="${{ steps.deploy .outputs.pages-deployment- alias-url }}">${{ steps.deploy .outputs.pages-deployment- alias-url }}</a></td>
9391 </tr>
9492 </table>
9593 message-failure : |
0 commit comments