Skip to content

Commit

Permalink
Migrate from cloudflare/pages-action to cloudflare/wrangler-action (#…
Browse files Browse the repository at this point in the history
…1335)

* Migrate from cloudflare/pages-action to cloudflare/wrangler-action as pages-action is deprecated

* Stop checking out the repo in the deploy jobs

* Fix
  • Loading branch information
whitphx authored Feb 19, 2025
1 parent 6858a2c commit c0d399b
Showing 1 changed file with 8 additions and 14 deletions.
22 changes: 8 additions & 14 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -452,22 +452,19 @@ jobs:
deployments: write
name: Deploy @stlite/sharing to Cloudflare Pages
outputs:
url: ${{ steps.publish.outputs.url }}
url: ${{ steps.deploy.outputs.pages-deployment-alias-url }}
steps:
- name: Checkout
uses: actions/checkout@v4
- uses: actions/download-artifact@v4
with:
name: stlite-sharing
path: website
- name: Publish
uses: cloudflare/pages-action@1
id: publish
- name: Deploy
uses: cloudflare/wrangler-action@392082e81ffbcb9ebdde27400634aa004b35ea37 # v3.14.0
id: deploy
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
projectName: stlite-sharing
directory: website
command: pages deploy website --project-name=stlite-sharing --branch=${{ github.head_ref || github.ref_name }} --commit-hash=${{ github.sha }}
gitHubToken: ${{ secrets.GITHUB_TOKEN }}

build-sharing-editor:
Expand Down Expand Up @@ -518,19 +515,16 @@ jobs:
deployments: write
name: Deploy @stlite/sharing-editor to Cloudflare Pages
steps:
- name: Checkout
uses: actions/checkout@v4
- uses: actions/download-artifact@v4
with:
name: stlite-sharing-editor
path: website
- name: Publish
uses: cloudflare/pages-action@1
- name: Deploy
uses: cloudflare/wrangler-action@392082e81ffbcb9ebdde27400634aa004b35ea37 # v3.14.0
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
projectName: stlite-sharing-editor
directory: website
command: pages deploy website --project-name=stlite-sharing-editor --branch=${{ github.head_ref || github.ref_name }} --commit-hash=${{ github.sha }}
gitHubToken: ${{ secrets.GITHUB_TOKEN }}

build-desktop:
Expand Down

0 comments on commit c0d399b

Please sign in to comment.