mirror of
https://github.com/tiennm99/loto.git
synced 2026-10-03 09:13:34 +00:00
next.config.mjs now detects CF_PAGES=1 (auto-injected by Cloudflare during build) and switches basePath from /loto to "" — assets resolve at the project root on loto.pages.dev. GH Pages keeps /loto unchanged. New workflow .github/workflows/deploy-cloudflare-pages.yml mirrors the GH Pages flow but publishes via cloudflare/wrangler-action@v3. Requires repo secrets CLOUDFLARE_API_TOKEN and CLOUDFLARE_ACCOUNT_ID; project name "loto" is hardcoded — adjust --project-name= in the workflow if your CF Pages project uses a different name. Dashboard-based deploys also work without code changes thanks to the CF_PAGES detection. See docs/deployment-guide.md for both paths.