Skip to content

feat: add Cloudflare Pages deployment support - #22

Merged
shahboura merged 4 commits into
mainfrom
feat/cloudflare-pages-deploy
Jul 13, 2026
Merged

feat: add Cloudflare Pages deployment support#22
shahboura merged 4 commits into
mainfrom
feat/cloudflare-pages-deploy

Conversation

@shahboura

@shahboura shahboura commented Jul 13, 2026

Copy link
Copy Markdown
Owner

Summary

Add Cloudflare Pages deployment support alongside existing Vercel/Netlify setups.

Changes

  • public/_redirects — SPA fallback rule (/* /index.html 200) for Cloudflare Pages
  • .github/workflows/cloudflare-pages.yml — GitHub Action that builds and deploys on push to main (production) and on PRs (preview)
  • pnpm-workspace.yaml — Allow workerd build scripts (required by Wrangler)

Setup required

Before merging, add these GitHub secrets:

  • CLOUDFLARE_API_TOKEN — API token with Pages:Edit permission
  • CLOUDFLARE_ACCOUNT_ID — Cloudflare account ID

Cloudflare Pages project it-tools must already exist.

- Add public/_redirects for SPA client-side routing fallback
- Add GitHub Actions workflow to deploy on PR/push using
  cloudflare/wrangler-action@v3

Requires CLOUDFLARE_API_TOKEN and CLOUDFLARE_ACCOUNT_ID secrets.
- Trigger on push to main (production) and PRs (preview)
- Add VITE_CLOUDFLARE_GIT_COMMIT_SHA env var
- branch ref is auto-mapped: main→production, others→preview
Comment thread .github/workflows/cloudflare-pages.yml Fixed
Actions job or workflow does not limit the permissions of the GITHUB_TOKEN. Consider setting an explicit permissions block, using the following as a minimal starting point: {{contents: read}}

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
@shahboura
shahboura merged commit bb08873 into main Jul 13, 2026
8 checks passed
@shahboura
shahboura deleted the feat/cloudflare-pages-deploy branch July 13, 2026 07:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants