This documentation site is built with Astro and Starlight, making it 100% static-site generator (SSG) compatible.
Method 1: Git Integration (Recommended)
- Push your repository to GitHub or GitLab
- Log into Cloudflare Dashboard → Workers & Pages → Create Application → Pages → Connect to Git
- Select your repository and branch
- Configure build settings:
- Framework Preset: Astro
- Root Directory:
docs_site - Build Command:
npm run build - Build Output Directory:
dist - Click Save and Deploy
Cloudflare Pages automatically builds and publishes with free global CDN, SSL, and edge distribution.
Method 2: CLI Deployment (wrangler)
cd docs_site
npm run build
npx wrangler pages deploy dist --project-name=justapi-docs
Cloudflare Pages Configuration
{
"name": "justapi-docs",
"pages_build_output_dir": "./dist"
}
Custom Domain
- Go to Cloudflare Pages → your project → Custom Domains
- Add your domain (e.g.,
docs.justapi.dev) - Update DNS records
See Also
- Docker — Container deployment
- Kubernetes / Helm — K8s deployment