Skip to content

Deploying this site

This site is internal-only. It is deployed manually with Wrangler to Cloudflare Pages and protected by Cloudflare Access (email-based login in front of the URL).

Terminal window
cd docs-site
npm install
npx wrangler login # opens the browser; use your Cloudflare account

Then create the Pages project (once):

Terminal window
npx wrangler pages project create chorki-docs --production-branch=main

From docs-site/:

Terminal window
npm run deploy

That runs the deep-dive sync, builds the site, and deploys dist/ to the chorki-docs Pages project. The site goes live at https://chorki-docs.pages.dev (and any custom domain attached to the project). If you change the project name, update site in astro.config.mjs.

Terminal window
npm run sync:deep-dives # mirror ../docs into the Deep Dives section
npm run dev # http://localhost:4321

The Deep Dives section is generated from ../docs/ — never edit files under src/content/docs/deep-dives/ directly; edit the source walkthroughs in docs/ and re-run the sync.

The Pages URL is public by default; Access puts authentication in front of it.

  1. Go to the Cloudflare dashboard → Zero Trust → Access → Applications → Add an application → Self-hosted.
  2. Application name: Chorki Docs. Application domain: chorki-docs.pages.dev (include any custom domain you attach later as an additional domain).
  3. Add a policy: Action = Allow, Include = Emails ending in @chorki.net (or an explicit list of team emails, or email OTP for one-off reviewers).
  4. Save. Visiting the site now redirects to a Cloudflare login page; only matching identities get through.

Notes:

  • Access sits in front of the whole pages.dev hostname, previews included (<hash>.chorki-docs.pages.dev is covered by the domain config above).
  • Since the site is behind Access, publishing all internal walkthroughs (including the security deep dives) is acceptable — but think twice before attaching a public custom domain.
Section Source Refreshed
Getting Started, Architecture, Features, Reference, this page hand-written in docs-site/src/content/docs/ edit directly
Deep Dives generated from the repo’s docs/ folder npm run sync:deep-dives (also runs in deploy)