Skip to content

Commit

Permalink
Attempt preview deploy via clouflare
Browse files Browse the repository at this point in the history
  • Loading branch information
kachick committed Jan 8, 2025
1 parent 5d1babc commit ea9cfa2
Showing 1 changed file with 24 additions and 1 deletion.
25 changes: 24 additions & 1 deletion .github/workflows/pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,30 @@ jobs:
- uses: actions/upload-pages-artifact@v3
with:
path: 'public'
deploy:
clouflare:
needs: [build]
timeout-minutes: 15
runs-on: ubuntu-24.04
permissions:
contents: read
deployments: write
steps:
- uses: actions/checkout@v4 # For enabling repo in gh command
- name: Download build assets
env:
GH_TOKEN: ${{ github.token }}
# upload-pages-artifact actually uploading artifacts with special structure. So we can download them
# See https://github.com/actions/upload-pages-artifact/blob/2d163be3ddce01512f3eea7ac5b7023b5d643ce1/.github/workflows/test-hosted-runners.yml#L37-L45
run: |
gh run download
- name: Deploy
uses: cloudflare/wrangler-action@6d58852c35a27e6034745c5d0bc373d739014f7f # v3.13.0
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
command: pages deploy public --project-name=example
gitHubToken: ${{ github.token }}
github:
needs: [build]
if: ${{ github.event_name != 'pull_request' }}
timeout-minutes: 15
Expand Down

0 comments on commit ea9cfa2

Please sign in to comment.