Skip to content

Cloudflare Pages Deployment

This documentation site is built with Astro and Starlight, making it 100% static-site generator (SSG) compatible.

  1. Push your repository to GitHub or GitLab
  2. Log into Cloudflare Dashboard → Workers & Pages → Create Application → Pages → Connect to Git
  3. Select your repository and branch
  4. Configure build settings:
    • Framework Preset: Astro
    • Root Directory: docs_site
    • Build Command: npm run build
    • Build Output Directory: dist
  5. Click Save and Deploy

Cloudflare Pages automatically builds and publishes with free global CDN, SSL, and edge distribution.

Terminal window
cd docs_site
npm run build
npx wrangler pages deploy dist --project-name=justapi-docs
{
"name": "justapi-docs",
"pages_build_output_dir": "./dist"
}
  1. Go to Cloudflare Pages → your project → Custom Domains
  2. Add your domain (e.g., docs.justapi.dev)
  3. Update DNS records