diff --git a/.github/workflows/pages-deploy.yml b/.github/workflows/pages-deploy.yml new file mode 100644 index 00000000..da391ce6 --- /dev/null +++ b/.github/workflows/pages-deploy.yml @@ -0,0 +1,25 @@ +# 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 }}