Day 13 of 23 · Friday · Learning

Cloudflare Pages — how zorc.app goes liveConcept

Cloudflare Pages is the static-file half of how everything at zorc.app goes live: wrangler uploads a folder, Pages serves it from Cloudflare's edge, and a custom domain on your zone points at it. Today you trace one real focaccia-vote deploy end to end.

Catch-up progress
13/23
Why this matters to you

Two of your live sites run on Pages right now — focaccia-vote.zorc.app and pdb.zorc.app — and both have already bitten you. Focaccia-vote's root URL returned a 404 for its first day live (no index.html in the folder, fixed 2026-05-28), and on 2026-06-08 the PDB cutover surfaced the bigger trap: a git push does NOT update pdb.zorc.app, because the project is direct-upload — only `wrangler pages deploy` does. Understanding the deploy path is the difference between 'the site froze yesterday and I don't know why' and a 30-second fix.

Cloudflare has two hosting products that look similar but do different jobs. **Pages** serves static files — HTML, JS, CSS, images — exactly as they sit in a folder, copied to Cloudflare's edge servers worldwide. **Workers** runs code on each request — it computes a response instead of returning a file. Your split: focaccia-vote and pdb.zorc.app are Pages (pre-rendered files, nothing computed); the PDB relay backend is Workers territory (it has a `wrangler.jsonc` and Durable Objects, because it holds live state). Rule of thumb: if the answer already exists as a file, Pages; if it has to be calculated per-request, Workers.

A Pages deploy is just an upload with bookkeeping. `wrangler pages deploy <folder>` takes everything in the folder, diffs it against the last deploy, uploads what changed, and stamps the result as a new immutable *deployment* — each one gets its own preview URL (like `abc123.focaccia-vote.pages.dev`) and the project's main URLs flip to point at the newest one. That's why rollback is trivial: old deployments still exist, the pointer just moves. Two special files ride along inside the folder: `_redirects` (URL aliases — focaccia-vote's maps the old `/dashboard` path to `/` with a 301) and `_headers` (per-path HTTP headers — yours forces browsers to revalidate HTML/JS so updates land without cache-busting). They're files in the deploy, not dashboard settings — delete them from the folder and the behavior disappears on the next deploy.

The two failure modes you've personally hit are both 'Pages serves exactly what you gave it.' The 404: Pages auto-maps `/vote.html` to the clean URL `/vote`, but the bare root `/` only works if the folder contains a literal `index.html` — focaccia-vote shipped with only `vote.html` and `dashboard.html`, so `/` was a 404 until you renamed `dashboard.html` to `index.html`. The frozen site: a *git-connected* Pages project rebuilds on every push, but both of your projects are *direct-upload* — GitHub is just backup storage, and the live site only changes when wrangler runs. That's why `/plan-day` step 4 explicitly runs `wrangler pages deploy` after the git push; skip it and pdb.zorc.app shows yesterday forever.

Worked example

The exact deploy path for focaccia-vote, from HANDOFF.md — this is what 'going live' literally is:

cd /Users/tom/Claude/JARBUS/projects/plaud-2ee4b9a7e2b4988b905fd8b897a698e2
wrangler pages deploy live/ --project-name focaccia-vote --branch main --commit-dirty=true

# and the PDB equivalent (plan-day runs this after every git push):
cd ~/Claude/PDB/output
wrangler pages deploy . --project-name pdb --branch main --commit-dirty=true
▶ Do it now
  1. Open a terminal and run `wrangler whoami` — confirm it shows your account (`9c1201c97290ae708567d6b36d313181`) without asking you to log in. That's the OAuth token at `~/.wrangler/config/default.toml` doing its job.
  2. Run `wrangler pages deployment list --project-name focaccia-vote` — read the deployment history. Notice each row is an immutable deployment with its own ID and URL; the top one is what focaccia-vote.zorc.app serves right now.
  3. Do a real (harmless — files unchanged) deploy: `cd /Users/tom/Claude/JARBUS/projects/plaud-2ee4b9a7e2b4988b905fd8b897a698e2 && wrangler pages deploy live/ --project-name focaccia-vote --branch main --commit-dirty=true`. Watch what it prints: files uploaded (or skipped as unchanged), then a unique deployment URL.
  4. Verify the side-effects: `curl -I https://focaccia-vote.zorc.app/` should return `200` (the index.html fix), and `curl -I https://focaccia-vote.zorc.app/dashboard` should return `301` with `location: /` — that 301 is your `_redirects` file executing at the edge. Re-run the deployment list and confirm your new deploy sits at the top.

Gotchas

Go deeper: Cloudflare Pages — direct upload with Wrangler · Pages _redirects file reference · Pages vs Workers — when to use which
One-card takeaway

A Pages site is just a folder you uploaded — git pushes back it up, but only `wrangler pages deploy` changes what the world sees.