Gyroscope report

Publish a GitHub repo to Cloudflare

Written Sun 1 Nov 2026 (week 44), revised Mon 2 Nov 2026 (week 45). Set up for colorsym-catalog and its site, colorsym-catalog.mathornament.workers.dev; change either address below.

The prompt

After each update, push to GitHub and paste this into Claude Code. It starts with this page's address for agents, colorsym-deploy.mathornament.workers.dev, because Claude Code cannot read the text of a spacesheep.dev link.

Once

Accept the Cloudflare invitation email, which adds you to the account that hosts the site. Without it, step 1 below stops before anything is published.

Instructions for the agent

These steps publish a GitHub repository to a Cloudflare site. The prompt that sent you here names the repository (REPO) and the site (SITE): use those two, not the examples in the form above. Do the steps in order. If a command fails, stop and show the person its error.

The values

Second part of the host name ACCOUNT
mathornament e1e1985643cc8491f400c94ffc9f399a

The steps

  1. Log in. Run npx --yes wrangler@4 whoami. If it says you are not logged in, run npx --yes wrangler@4 login, ask the person to finish signing in in the browser, then run whoami again. ACCOUNT must be in the list of accounts it prints; warnings above the list do not matter. If ACCOUNT is not there, stop: the person needs an invitation to that Cloudflare account.
  2. Check for unpushed work. Run git remote get-url origin in the folder you started in (your working directory). If it fails or does not print REPO (with or without .git at the end), that folder is not a clone of REPO: skip this step. If it prints REPO, run git status -sb there, and if its first line says ahead, ask the person whether to push those commits first; push only if they say yes.
  3. Get a clean copy. If DIR does not exist, run git clone REPO DIR. If it exists, run git -C DIR remote get-url origin, which must print REPO (with or without .git at the end; otherwise stop), then git -C DIR pull --ff-only.
  4. Write the two files shown under The two files below into DIR, with NAME and ACCOUNT filled in. If a file is already there, overwrite it with this content.
  5. Hide them from git. The file DIR/.git/info/exclude must contain these three lines: wrangler.jsonc, .assetsignore and .wrangler/. Add any that are missing. Then git -C DIR status --porcelain must print nothing; if it prints anything, stop and show it.
  6. Deploy. In DIR, run npx --yes wrangler@4 deploy. Its output must show SITE's address, printed without the trailing slash.
  7. Check the site. Fetch SITE, then every page its index links to (the links are relative, so add each to SITE). Follow redirects: a page may first answer 307, and each must end with HTTP status 200.
  8. Report to the person: DIR's current commit, which is what you published (git -C DIR log -1 --format="%h %cd"); step 6's line about asset files (Success! Uploaded … files, or No updated asset files to upload when nothing changed); and any page that failed in step 7.

Never commit or push in DIR, and never change files outside DIR. Deploy only from DIR: everything in the repository is published, exactly as it is on GitHub, and nothing else.

The two files

wrangler.jsonc:

{
  "name": "NAME",
  "account_id": "ACCOUNT",
  "compatibility_date": "2026-08-01",
  "assets": { "directory": ".", "not_found_handling": "none" },
  "observability": { "enabled": true }
}

.assetsignore:

.git
.gitattributes
.gitignore
.claude
.wrangler
node_modules
wrangler.jsonc
.assetsignore