feat: add Cloudflare Pages deployment support - #22
Merged
Conversation
- 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
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>
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 tomain(production) and on PRs (preview)pnpm-workspace.yaml— Allowworkerdbuild scripts (required by Wrangler)Setup required
Before merging, add these GitHub secrets:
CLOUDFLARE_API_TOKEN— API token with Pages:Edit permissionCLOUDFLARE_ACCOUNT_ID— Cloudflare account IDCloudflare Pages project
it-toolsmust already exist.