Deploy Website to Cloudflare Pages
Tip: The
websitedirectory is a reference template included with ReadyStart. Make a copy of it before making changes — customize the copy with your own brand, content, and styles. Do not modify the original files directly to avoid conflicts when syncing updates.
The website is built with Astro and produces static files. Cloudflare Pages is the recommended deployment platform.
Prerequisites
- Cloudflare account
- Code pushed to GitHub repository
1. Create Pages Project
- Login to Cloudflare Dashboard → Workers & Pages → Create
- Select Pages → Connect to Git
- Select your GitHub repository
2. Build Configuration
| Setting | Value |
|---|---|
| Build command | npm ci && npm run build --workspace=website |
| Output directory | website/dist |
| Root directory | / (keep default) |
| Node.js version | 22 |
Set Node.js version: Add
NODE_VERSION = 22in Environment variables.
3. Environment Variables
In Cloudflare Pages → Settings → Environment variables, add:
PUBLIC_BACK_END=https://api.yourdomain.com
PUBLIC_TITLE=ReadyStart
...
See Environment Variables for the full list.
4. Custom Domain
- Pages project → Custom domains → Set up a custom domain
- Enter your domain, e.g.
yourdomain.com - Cloudflare will automatically add DNS records and provision SSL
Deployment Triggers
- Push to main branch → automatic production deployment
- Push to other branches → automatic preview deployment (Preview URL)
Notes
- The build command includes
npm cibecause Cloudflare Pages doesn’t automatically install monorepo dependencies - If the build fails, check the Node.js version