Skip to content

Cloudflare Pages deployment

Production target

ItemValue
Cloudflare accountoliver@dynamx.io
Pages projectescape-house-wiki
Production branchmain
Stable addresshttps://escape-house-wiki.pages.dev/
Upload directorysite/public

The Pages address is publicly reachable. Generated responses carry X-Robots-Tag: noindex, nofollow, but that is not access control.

Files and build

  • Edit the canonical Markdown in the repository root and docs/.
  • site/scripts/sync-docs.mjs prepares that Markdown for VitePress.
  • VitePress builds the knowledge base under site/public/docs/.
  • site/scripts/prepare-pages.mjs adds the root redirect and Pages headers.
  • site/content and site/public are generated and must not be edited or committed.

Local validation

From site/, run:

bash
npm ci
npm run release:check

The release check synchronizes the Markdown, builds the documentation and Pages files, and tests the rendered output.

For an optional documentation preview, run npm run dev and open the local address it prints.

First-time project creation

Wrangler must report the intended Cloudflare identity before any write:

bash
cd site
npx wrangler whoami

Proceed only when the output identifies oliver@dynamx.io. Create the project once:

bash
npx wrangler pages project create escape-house-wiki --production-branch main

Do not repeat project creation for routine releases.

Routine deployment

Validate and commit the exact source first. From site/, deploy that commit with Wrangler:

bash
npm ci
npm run release:check
npx wrangler whoami
npx wrangler pages deploy public \
  --project-name escape-house-wiki \
  --branch main \
  --commit-hash "$(git rev-parse HEAD)" \
  --commit-message "$(git log -1 --pretty=%s)" \
  --commit-dirty=false

The identity check must show oliver@dynamx.io, and the working tree should be clean. After deployment, verify both the latest Cloudflare record and the stable address:

bash
npx wrangler pages deployment list --project-name escape-house-wiki
curl -I -L https://escape-house-wiki.pages.dev/

A release is complete only when the deployment succeeds and the stable address serves the new version.