Host this site behind auth
Get ops-docs onto Cloudflare Pages with Cloudflare Access in front, so it's readable from a phone but not by anyone else.
Auth is not a Docusaurus concern. The site builds to static HTML either way, the login happens at the hosting layer in front of the files.
Steps
| # | Step | Detail | Who |
|---|---|---|---|
| 1 | Decide the hostname | ops-docs.pages.dev free, or docs.codeaddicts.io. Domain is already on Cloudflare | Me |
| 2 | Create the Pages project | From nathan-roberts/ops-docs. Build npm run build, output build, Node 20+ | Me, needs browser |
| 3 | Set the real url | In docusaurus.config.js, currently a placeholder | Claude |
| 4 | Verify the first deploy | Builds clean on Cloudflare, sidebar and search work | Claude |
| 5 | Create the Access application | Self-hosted app in Zero Trust over the hostname. Free up to 50 users | Claude, via API |
| 6 | Add the allow policy | My email only | Claude, via API |
| 7 | Cover preview deployments | See the trap below | Claude, via API |
| 8 | Test anonymous access | Private window, production and a preview URL | Claude |
| 9 | Replace logo and favicon | Cosmetic, do last. Favicon idea: 🧠 | Claude |
Step 2 is the handoff. Connecting a private repo needs the Cloudflare GitHub app authorized against it, which is a browser click-through I can't do.
The trap in step 7
Cloudflare Pages gives every branch and commit its own preview URL on *.pages.dev. An Access application covering only the production hostname leaves those wide open, and a preview serves the entire site.
Either add a wildcard Access application over *.ops-docs.pages.dev, or turn preview deployments off. Don't skip this.
Note
The same steps are mirrored in the session task list for execution.