Deploying the docs
The docs site (docs/) is a static Astro/Starlight site. The recommended host is Cloudflare Pages.
Cloudflare Pages — Git integration (easiest)
Connect your GitHub repository directly to Cloudflare Pages. Every push to main triggers a new build.
-
Go to Cloudflare Dashboard → Workers & Pages → Create.
-
Select Pages → Connect to Git → pick your repo.
-
Configure the build:
Setting Value Framework preset Astro Build command npm run buildBuild output directory distRoot directory docs -
Click Save and Deploy.
Custom domain
After the first deployment:
- In your Pages project → Custom domains → Set up a custom domain.
- Enter
orwell.codesilva.com. - Cloudflare will add the DNS record automatically (since codesilva.com is already on Cloudflare).
Cloudflare Pages — Wrangler CLI (CI/CD)
For more control, deploy via Wrangler in GitHub Actions.
One-time setup
- Create the Pages project in the Cloudflare dashboard (without Git integration).
- Get your
CLOUDFLARE_API_TOKENandCLOUDFLARE_ACCOUNT_IDfrom the dashboard. - Add them as GitHub secrets.
GitHub Actions workflow
name: Deploy docs
on: push: branches: [main] paths: - 'docs/**'
jobs: deploy: runs-on: ubuntu-latest permissions: contents: read deployments: write steps: - uses: actions/checkout@v4
- uses: actions/setup-node@v4 with: node-version: '22'
- name: Install & build working-directory: docs run: | npm ci npm run build
- name: Deploy to Cloudflare Pages uses: cloudflare/wrangler-action@v3 with: apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }} accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} command: pages deploy dist --project-name=orwell-docs workingDirectory: docsLocal development
cd docsnpm installnpm run devOpens at http://localhost:4321.
Local preview (production build)
cd docsnpm run buildnpm run preview