diff --git a/.github/workflows/pages-deploy.yml b/.github/workflows/pages-deploy.yml index da391ce6..2a56b832 100644 --- a/.github/workflows/pages-deploy.yml +++ b/.github/workflows/pages-deploy.yml @@ -1,9 +1,10 @@ # 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. +# Fallback Cloudflare Workers deploy via Direct Upload (wrangler deploy). +# Bypasses the Cloudflare Git Integration build system entirely. +# Uses wrangler deploy (Workers + Assets) rather than the deprecated +# `wrangler pages deploy` now that wrangler.toml uses [assets] syntax. # Required secrets: CLOUDFLARE_API_TOKEN, CLOUDFLARE_ACCOUNT_ID -name: Deploy to Cloudflare Pages +name: Deploy to Cloudflare Workers on: push: @@ -18,8 +19,8 @@ jobs: 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 + - name: Deploy site/ to Cloudflare Workers (static assets) + run: npx wrangler@latest deploy env: CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }} CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} diff --git a/wrangler.toml b/wrangler.toml index c515d103..f16080eb 100644 --- a/wrangler.toml +++ b/wrangler.toml @@ -1,7 +1,18 @@ # SPDX-License-Identifier: MPL-2.0 -# Cloudflare Pages configuration for boj-server.net. -# The site is a no-build static bundle; Pages serves the `site/` directory as-is. +# Cloudflare Workers static-asset configuration for boj-server.net. +# Migrated from Pages (pages_build_output_dir) to Workers + Assets format: +# the old key is not recognised by the Workers build system post-Pages merger. +# +# [build] command="" prevents the Git Integration from attempting to install +# .tool-versions entries (Zig, Elixir, Idris2, Deno) before a non-existent +# build step. The site/ directory is deployed as-is with no build phase. +# For the GitHub Actions fallback see .github/workflows/pages-deploy.yml. name = "boj-server" compatibility_date = "2026-06-24" -pages_build_output_dir = "site" + +[assets] +directory = "site" + +[build] +command = ""