Add Cloudflare Pages Direct Upload fallback deploy Action (#245) #1
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # SPDX-License-Identifier: MPL-2.0 | |
| # Fallback Cloudflare Pages deploy via Direct Upload (wrangler pages deploy). | |
| # Bypasses the Cloudflare build system entirely — no .tool-versions install | |
| # attempt, no `wrangler deploy` (Workers command) confusion. | |
| # Required secrets: CLOUDFLARE_API_TOKEN, CLOUDFLARE_ACCOUNT_ID | |
| name: Deploy to Cloudflare Pages | |
| on: | |
| push: | |
| branches: [main] | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| jobs: | |
| deploy: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Deploy site/ to Cloudflare Pages | |
| run: npx wrangler@latest pages deploy site/ --project-name=boj-server | |
| env: | |
| CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }} | |
| CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} |