Deploying
What runs where
Section titled “What runs where”pull request → build + check + link check → preview version on Workersmerge to main → build → wrangler deploy → your domainOne-time setup
Section titled “One-time setup”- Create a Cloudflare API token with Workers Scripts: Edit and Account Settings: Read.
- Add repository secrets
CLOUDFLARE_API_TOKENandCLOUDFLARE_ACCOUNT_ID. - Attach the custom domain to the
nimbus-docsWorker (Workers → Settings → Domains & Routes).
The Wrangler config
Section titled “The Wrangler config”{ "name": "nimbus-docs", "compatibility_date": "2026-11-01", "assets": { "directory": "./dist", "not_found_handling": "404-page", "html_handling": "auto-trailing-slash" }}Assets are uploaded with the Worker in one operation, so there is no separate bucket to keep in sync and no cache to purge — a new deploy is a new version.
Redirects and headers
Section titled “Redirects and headers”public/_redirects is copied into dist/ at build time:
/old/path/ /new/path/ 301public/_headers sets caching and security headers per path pattern:
/_astro/* Cache-Control: public, max-age=31536000, immutableHashed asset filenames make the long cache safe; HTML is left revalidating.
Rolling back
Section titled “Rolling back”pnpm dlx wrangler deployments listpnpm dlx wrangler rollback <deployment-id>Because every deploy is an immutable version, rollback is instant and does not need a rebuild.