Cloudflare Pages + Access setup record
This page records the manual Cloudflare dashboard steps for the docs portal. Reproduce these only if rebuilding from scratch.
Pages project
Section titled “Pages project”- Name:
paperboard-docs - Source:
github.com/paper-board/.githubon GitHub (branchmain) - Build command:
cd docs && npm run build - Build output:
docs/dist - Custom domain:
docs.paperboard.app
- Cloudflare dashboard → Workers & Pages → Create application → Pages → Connect to Git.
- Select
paper-board/.githubrepo, branchmain. - Set project name:
paperboard-docs. - Production branch:
main. - Build settings: framework preset = Astro, build command =
cd docs && npm run build, build output =docs/dist. - Click Save and Deploy. First build takes ~3-5 min.
Custom domain
Section titled “Custom domain”- Pages project → Custom domains → Set up custom domain.
- Enter
docs.paperboard.app. - Cloudflare auto-creates a CNAME from
docs.paperboard.app→paperboard-docs.pages.dev. - Wait for DNS propagation (~30 sec).
- Verify:
curl -I https://docs.paperboard.appreturns 200 OK (before SSO is active).
Access policy
Section titled “Access policy”- IdP: Google OAuth
- Allow rule: emails ending in
@kovankaya.com+ per-email guest whitelist - Session duration: 24 hours
- Cloudflare dashboard → Zero Trust → Access → Applications → Add an application → Self-hosted.
- Application name:
paperboard docs. - Session duration: 24 hours.
- Application domain:
docs.paperboard.app. - Add Identity Provider: Google → enter Google OAuth client ID + secret (create via console.cloud.google.com if needed).
- Add policy: Name
paperboard team + guests. Action: Allow. Include rule:Emails ending in @kovankaya.comOREmails in: <guest-email-list>. - Save.
- Verify: incognito browser →
https://docs.paperboard.app→ redirects to Google SSO → after sign-in renders docs.
Secrets
Section titled “Secrets”| Secret | Scope | Description |
|---|---|---|
CLOUDFLARE_API_TOKEN | org secret | Single permission: Account / Cloudflare Pages / Edit |
CLOUDFLARE_ACCOUNT_ID | org secret | Cloudflare Account ID (dashboard → Account → Account ID) |
DOCS_DISPATCH_PAT | org secret | Fine-grained PAT, repository_dispatch:write on paper-board/.github |
CLOUDFLARE_ACCESS_AUD is deferred to Phase 5+ (Access JWT verification for API endpoints behind the SSO gate).