Deployment

Your docs site is a fully static build — no server needed. Deploy it anywhere static files are hosted. Cloudflare Pages is the recommended option: it’s fast, free, and has zero cold starts.

tips_and_updates
Cloudflare Pages free tier includes unlimited sites, 500 builds/month, and global CDN distribution.

Steps

  1. Push your repo to GitHub or GitLab
  2. Open the Cloudflare dashboardWorkers & Pages
  3. Click Create application → Pages → Connect to Git
  4. Select your repository
  5. Configure the build:
SettingValue
Framework presetAstro
Build commandnpm run build
Build output directorydist
  1. Click Save and Deploy

Every push to your main branch triggers an automatic redeploy.

Custom domain

In Workers & Pages → your-project → Custom domains, add your domain. Cloudflare manages the SSL certificate automatically.

Build pipeline

flowchart LR subgraph Local A[Edit .md files] --> B[git push] end subgraph Cloudflare B --> C[Pages build] C --> D[astro build] D --> E[/dist/] E --> F[CDN edge nodes] end F --> G[Users worldwide]

Manual deploy with Wrangler

You can also deploy from the command line:

npm install -g wrangler
wrangler pages deploy dist --project-name=your-docs-site

Environment variables

Set them in the Cloudflare dashboard under Settings → Environment variables, or via Wrangler:

wrangler pages secret put MY_API_KEY

Access them in .astro files via import.meta.env.MY_API_KEY.

Preview deployments

Every pull request automatically gets a unique preview URL — great for reviewing docs changes before merging.