Cloudflare Pages
Deploying the Thamizhi documentation site on Cloudflare Pages.
Why Cloudflare Pages
Section titled “Why Cloudflare Pages”- Fast: Global CDN with edge caching
- CI/CD: Auto-deploys from GitHub on push
- Custom domain: SSL certificate
- Workers integration: API + frontend on same network
Deployment Options
Section titled “Deployment Options”Option 1: GitHub Integration (Recommended)
Section titled “Option 1: GitHub Integration (Recommended)”- Push the docs repo to GitHub
- Go to Cloudflare Dashboard → Pages → Create a project
- Connect your GitHub repository
- Set build settings:
- Build command:
npm run build - Build output:
dist
- Build command:
- Deploy
Option 2: Wrangler CLI
Section titled “Option 2: Wrangler CLI”# Install Wranglernpm install -g wrangler
wrangler login
# Deploywrangler pages deploy dist/ --project-name thamizhi-docsBuild Configuration
Section titled “Build Configuration”# wrangler.toml (optional - for advanced config)name = "thamizhi-docs"pages_build_output_dir = "dist"
[env.production]routes = [ { pattern = "thamizhi.app", custom_domain = true }]Custom Domain
Section titled “Custom Domain”# Add custom domain in Cloudflare Dashboard# Pages → thamizhi-docs → Custom domains → Add# Enter: docs.thamizhi.app# Cloudflare auto-provisions SSL