Skip to content

Deploy docs (Cloudflare Pages)

We deploy the documentation site using Cloudflare Pages (Git integration). This works with private repos and avoids GitHub Pages limitations.

One-time setup (Cloudflare dashboard)

  1. Cloudflare Dashboard → Workers & PagesPagesCreate a project
  2. Choose Connect to Git and authorize GitHub
  3. Select this repository and the branch you want to deploy (usually main)
  4. Project name: keypool-docs

Build settings

Set these in the Pages project configuration (for project keypool-docs):

  • Framework preset: None
  • Build command:

bash pip install -r requirements-docs.txt mkdocs build --strict

  • Build output directory: site

Environment variables (advanced)

Add:

  • PYTHON_VERSION = 3.12

Cloudflare Pages will provision that Python version for the build.

Cloudflare Pages will run the build and publish the static output.

Custom domain (later)

When you're ready:

  1. Pages project → Custom domains → add your domain (e.g. docs.keypool.lvtu.in)
  2. After the domain is active, update mkdocs.yml and set:

yaml site_url: "https://docs.keypool.lvtu.in/"

This improves canonical URLs and social previews.

Scalar API reference

The Scalar page (docs/api-reference.md) loads the OpenAPI spec from docs/openapi.json at runtime using a relative URL. When the site is deployed, the spec will be available at:

  • /openapi.json

So the API reference works unchanged on Cloudflare Pages.