Home / Ops / The Locked Demo

Demo preview subdomain, setup steps

Updated Jun 17, 2026 · Affirmology_DemoPreview_Setup_v1.md

Summary. Goal: a private preview site to test demo changes before they touch the live demo.affirmology.ai. Push to a preview branch, review on the preview subdomain, then merge to go live. The locked demo only changes on a deliberate merge to main.

Demo preview subdomain, setup steps

Goal: a private preview site to test demo changes before they touch the live demo.affirmology.ai. Push to a preview branch, review on the preview subdomain, then merge to go live. The locked demo only changes on a deliberate merge to main.

Naming (read first)

Use demopreview.affirmology.ai. It is one level under affirmology.ai, so Cloudflare's free Universal SSL covers it automatically. preview.demo.affirmology.ai is two levels deep, which Universal SSL does NOT cover, so it would need a paid Advanced Certificate. Same outcome, less hassle: go with demopreview.affirmology.ai.

How it works

The demo front-end (affirmology-site) is a Git-connected Cloudflare Worker. We add a SECOND worker that builds the preview branch and lives at demopreview.affirmology.ai. Your existing worker keeps serving main to the live demo.

Step 1, create the preview branch (Claude Code or GitHub)

Paste to Claude Code:

In the jeffparkerlove22/affirmology-site repo, create a branch named preview off main and push it to GitHub. Confirm it exists. (Or in GitHub Desktop: Branch, New Branch, name it preview, Publish branch.)

Step 2, create the preview worker (Cloudflare, you click)

  1. dash.cloudflare.com, your account, Compute (Workers), Workers & Pages.
  2. Create, Connect to Git (or Import a repository), choose affirmology-site.
  3. Name it affirmology-site-preview.
  4. Set the production branch for THIS service to preview (not main). Build settings the same as the live one (output dir if asked: the same as affirmology-site uses).
  5. Save and Deploy.

Step 3, point the subdomain at it (Cloudflare)

  1. Open the new affirmology-site-preview worker, Settings, Domains & Routes, Add, Custom Domain.
  2. Type demopreview.affirmology.ai, Add. Cloudflare creates the DNS and the SSL. Wait for Active.
  1. Zero Trust, Access, Applications, Add an application, Self-hosted.
  2. Domain: subdomain demopreview, domain affirmology.ai.
  3. Policy: Allow, Emails, your team's addresses. One-time PIN. Finish. So only the team can see previews.

The workflow (after setup)

Notes