@@ -56,17 +56,15 @@ jobs:
56
56
run : yarn build
57
57
- name : Publish to Cloudflare Pages
58
58
# 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
61
61
with :
62
+ # Token with Cloudflare Pages edit permission only generated in Cloudflare dashboard -> Manage Account -> Account API Tokens
62
63
apiToken : ${{ secrets.CLOUDFLARE_PAGES_API_TOKEN }}
64
+ # Acquired from Cloudflare dashboard -> Compute > Workers & Pages or dashboard url: https://dash.cloudflare.com/<account-id>/
63
65
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) || '' }}
70
68
# On a subsequent run the original comment will be updated.
71
69
- name : Update PR comment
72
70
uses : mshick/add-pr-comment@v2
@@ -85,11 +83,11 @@ jobs:
85
83
</tr>
86
84
<tr>
87
85
<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>
89
87
</tr>
90
88
<tr>
91
89
<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>
93
91
</tr>
94
92
</table>
95
93
message-failure : |
0 commit comments