Scale · Deployment · intermediate
Set Up Cloudflare Pages Auto-Deploy from GitHub
Deployment General intermediate LovableBolt.new
How to use
- Copy the prompt below
- Paste it into Lovable, Bolt.new
- Review the output and follow up with refinements
Prompt
Set up automatic deployment to Cloudflare Pages from our GitHub repository. Create a GitHub Actions workflow file at .github/workflows/deploy.yml that triggers on pushes to the main branch, runs the build command, and deploys the output to Cloudflare Pages using the official Cloudflare Pages GitHub Action. The workflow should install Node.js 20, run npm ci to install dependencies, run npm run build, then deploy the dist directory. Use CLOUDFLARE_API_TOKEN and CLOUDFLARE_ACCOUNT_ID as repository secrets. Also add a separate preview deployment step that runs on pull requests and posts the preview URL as a PR comment so the team can review changes before merging. Include cache steps for node_modules to speed up subsequent deployments. Related prompts
Was this helpful?
Enjoying this guide?
Get weekly practical guides, plus tool updates and implementation playbooks.