Skip to content

Deploying

pull request → build + check + link check → preview version on Workers
merge to main → build → wrangler deploy → your domain
  1. Create a Cloudflare API token with Workers Scripts: Edit and Account Settings: Read.
  2. Add repository secrets CLOUDFLARE_API_TOKEN and CLOUDFLARE_ACCOUNT_ID.
  3. Attach the custom domain to the nimbus-docs Worker (Workers → Settings → Domains & Routes).
{
"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.

public/_redirects is copied into dist/ at build time:

/old/path/ /new/path/ 301

public/_headers sets caching and security headers per path pattern:

/_astro/*
Cache-Control: public, max-age=31536000, immutable

Hashed asset filenames make the long cache safe; HTML is left revalidating.

Terminal window
pnpm dlx wrangler deployments list
pnpm dlx wrangler rollback <deployment-id>

Because every deploy is an immutable version, rollback is instant and does not need a rebuild.