offplan · online
Session · conv-30-cloudflare

Session CONV-30 — Cloudflare deploy stretch

This stretch took the repo from "HTML renders exist locally" to "HTML renders are live at a shareable HTTPS URL on a custom domain." The end state: `https://preview.offplan.online/` serves the…

In Progresssessionconv-30-cloudflare

Third track of a multi-track CONV-30 day. The earlier /handoff in this same conversation closed the buyer-journey track (CONV-30-buyer-journey.md). After that, Roman asked to "actually connect with Cloudflare and ensure whatever we are creating, like to view, is actually running on an actual online so that we can share it between myself and Sergei, but also with any external parties we want." This file documents everything from that ask onward.

Resume Prompt

Cloudflare deploy is live at https://preview.offplan.online/ — any HTML committed to docs/rendered/ on the os repo auto-deploys via the GitHub Action (once API token secrets are added) or via wrangler pages deploy docs/rendered/ --project-name=offplan-preview --branch=main manually. CLAUDE.md § "Live preview at preview.offplan.online" documents the convention. First action next session: add CLOUDFLARE_API_TOKEN + CLOUDFLARE_ACCOUNT_ID repo secrets in GitHub (offplan-online/os → Settings → Secrets and variables → Actions), then test by pushing a trivial change to docs/rendered/ and watching the Action deploy. Also: clean up the stray cf-*.png / github-*.png debug screenshots in os/ root (left over from the Playwright-driven dashboard attempt).

Summary

This stretch took the repo from "HTML renders exist locally" to "HTML renders are live at a shareable HTTPS URL on a custom domain." The end state: https://preview.offplan.online/ serves the contents of docs/rendered/ from Cloudflare Pages, with a paired https://offplan-preview.pages.dev/ backup URL. An auto-generated index page lists every render latest-first using the canonical bundle visual register so the entry surface feels brand-consistent. A GitHub Action wired via cloudflare/wrangler-action@v3 redeploys on every push to main that touches docs/rendered/**, plans/**.md, workstreams/**.md, or the index generator script — but is one step short of running unattended (two repo secrets still need to be added; ~2 min human action).

The shape of the work split cleanly in two: investigation + architecture choice (single-repo vs two-repo; single-repo won) and execution (which started in the Cloudflare dashboard via Playwright and pivoted to wrangler CLI when a dashboard UI bug blocked progress). The dashboard's GitHub repo-connection dropdown only surfaces personal accounts — even after installing the Cloudflare GitHub App on the offplan-online org and re-running the OAuth flow, the org never appeared in the dropdown. Multiple re-install / re-OAuth / fresh-dropdown iterations all failed at the same step. Pivoting to wrangler pages project create + wrangler pages deploy worked first try. Custom domain provisioning via the Cloudflare dashboard's Custom domains tab (a different surface) worked fine — only the repo-selection step is buggy.

Beyond the deploy itself, this stretch also closed out the offplan-online/preview GitHub repo (archived, no longer needed under the single-repo architecture), added the live-preview convention to CLAUDE.md for future Sergei/Roman onboarding parity, and added a project-scoped .gitignore line for wrangler's local cache.

Changes

Live deploy

Index page generator

Auto-deploy automation

Convention added to CLAUDE.md

Repo housekeeping

Commits this session-tail (Cloudflare stretch)

  1. e7a4cc9 feat: docs/rendered/index.html auto-generator + initial index
  2. 608f2c1 feat: Cloudflare Pages auto-deploy to preview.offplan.online
  3. 9d941df chore: gitignore .wrangler/

Earlier today, before the explicit Cloudflare ask, these CONV-30 commits also landed under the buyer-journey track (separately recorded in CONV-30-buyer-journey.md):

What's Next

  1. Roman adds the two GitHub repo secrets (~2 min, one-time):
    • Create Cloudflare API token at https://dash.cloudflare.com/profile/api-tokens (template: "Edit Cloudflare Workers" — includes Pages permissions).
    • Add to offplan-online/os → Settings → Secrets and variables → Actions:
      • CLOUDFLARE_API_TOKEN = (the new token)
      • CLOUDFLARE_ACCOUNT_ID = b16caee7481d783c292d26ec76782cb1
    • Test by pushing a trivial change under docs/rendered/ and watching the Action tab.
  2. Clean up stray debug screenshots in os/ root: cf-*.png and github-*.png (Playwright captures from the dashboard-driving attempt). .playwright-mcp/ is already gitignored but the root-level screenshots aren't. Either delete or add the patterns to .gitignore.

Open Questions

Key Context