Deploy to Cloudflare Pages
Every theme builds to a static dist/ folder, which means it deploys to any static host. Cloudflare Pages is our recommended target — generous free tier, global edge cache, and seamless custom-domain wiring.
Option A — Connect a Git repository (recommended)
Section titled “Option A — Connect a Git repository (recommended)”The hands-off path. Push your theme to GitHub, point Cloudflare Pages at the repo, every commit deploys automatically.
-
Push your theme to GitHub (or GitLab / Bitbucket — Cloudflare supports all three):
Terminal window git initgit add .git commit -m "Initial commit"git branch -M maingit remote add origin https://github.com/you/your-site.gitgit push -u origin main -
Create a Pages project: dash.cloudflare.com → Workers & Pages → Create → Pages → Connect to Git → select your repo.
-
Build settings:
Setting Value Framework preset Astro Build command npm run buildBuild output directory distRoot directory /(leave default)Node version 20(or 22) -
Environment variables (optional): under “Environment variables (advanced)”, add
NODE_VERSION = 20if your repo doesn’t have a.nvmrc. -
Save and Deploy.
The first build takes ~1–2 minutes. Subsequent builds take 30–60 seconds.
Option B — Wrangler CLI (single command from your terminal)
Section titled “Option B — Wrangler CLI (single command from your terminal)”For when you don’t want Git → CI → deploy in the middle. Useful for client demos.
-
Install Wrangler (if you don’t already have it):
Terminal window npm install -g wrangler -
Authenticate:
Terminal window wrangler login -
Build and deploy:
Terminal window npm run buildnpx wrangler pages deploy dist --project-name=my-siteThe bundled
deploy:cloudflarescript inpackage.jsonalready wraps this:Terminal window npm run deploy:cloudflareFirst deploy creates the project on Cloudflare automatically; subsequent deploys publish to the same project.
Custom domain
Section titled “Custom domain”After the first deploy you’ll have a URL like my-site-abc.pages.dev. To point your own domain at it:
- In the Cloudflare Pages dashboard, your project → Custom domains → Set up a custom domain.
- Enter your domain (e.g.
aurora.dev). - Cloudflare gives you a CNAME / A record to add at your DNS provider. (If your domain is already on Cloudflare DNS, it sets the record for you.)
- SSL is automatic — Cloudflare issues a Let’s Encrypt cert within a few minutes.
See Custom domain for the deep dive.
Common gotchas
Section titled “Common gotchas”What’s next
Section titled “What’s next”- Custom domain — point a real domain at this build.
- Vercel — same theme, different host.
- Netlify — same theme, a third host (required if you use Netlify Forms).