description: Cloudflare Pages deploy procedure for gazperi.com — Wrangler from local repo, custom domain, rollback.
Hosting: Cloudflare Pages, project name gazperi-com. Domain gazperi.com is on Cloudflare nameservers (registrar: Hostinger). Deploys are triggered manually from the local repo via Wrangler — no CI, no GitHub remote.
| Item | Where |
|---|---|
| Cloudflare account | https://dash.cloudflare.com |
| Pages project | gazperi-com (created via dashboard or wrangler pages project create gazperi-com). |
| Wrangler login | npx wrangler login once per machine. |
| Custom domain | Bound via Pages → Custom Domains → gazperi.com and www.gazperi.com. |
| DNS | gazperi.com zone managed in Cloudflare; nameservers set at Hostinger. |
| Environment variables | Pages → Settings → Environment Variables: POSTHOG_KEY, POSTHOG_HOST (production + preview). |
Build locally. cd /Users/gazperi/Developer/SITE/site-com && npm run build. Confirm build/ is fresh and npm run serve smoke-passes.
Deploy. npx wrangler pages deploy build --project-name=gazperi-com. Wrangler prints a *.pages.dev preview URL (current deploy) and the production URL. Visit the preview URL first to verify the build before traffic flips.
Promote to production. Cloudflare Pages auto-promotes the latest deploy to production. To deploy to a named branch instead: --branch=preview (or other). Production lives on main-equivalent default branch alias.
Verify live. curl -I https://gazperi.com returns 200 and the right headers. Open the site, click Educação, confirm the docs route works, confirm PostHog events fire.
Rollback. Cloudflare Pages → project → Deployments → choose a previous successful deploy → "Rollback to this deployment". Or redeploy a previous local build state.
gazperi.com zone. Cloudflare scans existing DNS records; review and accept.dig NS gazperi.com — should return ns1.cloudflare.com / similar). Typically minutes; can be hours.gazperi.com and www.gazperi.com (CNAME redirect to apex) to the Pages project under Custom Domains.Rollback the cutover: revert nameservers at Hostinger to the previous values. Domain returns to the old host within propagation window.
wrangler pages deploy without --project-name — picks an interactive prompt, fragile in scripts.