Lewati ke isi

Cloudflare Pages Documentation Runbook

Status: TECHNICAL_ALPHA_NOT_CERTIFIED. This runbook prepares documentation hosting only; it does not promote or certify the CBT application.

Pages projects

Create two separate Cloudflare Pages projects before merging the documentation workflow to main:

Project Artifact Custom domain Visibility
scola-assessment-docs-public site-public docs-cbt.gcgscola.id Public
scola-assessment-docs-internal site-internal docs-internal-cbt.gcgscola.id Cloudflare Access only

The GitHub workflow deploys only from main; pull requests only validate and upload short-lived artifacts. Do not configure the internal project as a preview deployment target.

GitHub Environments and token scope

Create protected environments cbt-docs-public and cbt-docs-internal. Each requires reviewer approval before deployment. Store these secrets in both environments:

  • CLOUDFLARE_API_TOKEN: dedicated token with only Account → Cloudflare Pages → Edit access. This permission is account-scoped, so it cannot be safely limited to one Pages project; use a dedicated Cloudflare account if a smaller blast radius is required.
  • CLOUDFLARE_ACCOUNT_ID: Cloudflare account identifier, not a credential.

Do not place access tokens in Markdown, repository variables, frontend bundles, or workflow output. Keep branch protection so only reviewed changes can reach main.

Cloudflare Access for the internal portal

Create a self-hosted Cloudflare Access application for docs-internal-cbt.gcgscola.id with a default-deny policy. Permit only the named internal tester/operator group through the approved identity provider. Enable session duration appropriate to the testing window and require reauthentication after membership changes. Access policy must be tested with one authorized and one unauthorized identity before staff documentation is shared.

Post-deploy verification

  1. Confirm https://docs-cbt.gcgscola.id returns the public participant portal.
  2. Confirm its search index does not contain /internal/, /specs/, /runbooks/, or staff usernames.
  3. Confirm https://docs-internal-cbt.gcgscola.id redirects an unauthorized browser to Cloudflare Access and serves internal pages only after login.
  4. Record deployment commit, Pages deployment URL, Access policy identifier, and verifier in release evidence. Do not record password values.