infra/ci-controller/README.md

Git Cafe CI on Instabox

A copy of the astro-dither CI controller, scoped to screen/theo-bench and the personal Cloudflare account.

When Git Cafe queues a job labelled theo-bench, it sends a signed webhook to the theo-bench-ci Worker. The Worker creates an Instabox VM, registers a one-job runner on the repository, and deletes the VM when the job ends. Instabox also deletes the VM after 40 minutes if the Worker stops responding. Only pushes to main deploy dist to Cloudflare Pages. Pull requests build and test but never deploy.

Worker secrets

  • WEBHOOK_SECRET: verifies Git Cafe webhook signatures.
  • GITCAFE_TOKEN: can create runner credentials for screen/theo-bench.
  • INSTABOX_API_KEY: machine read, write and delete for the org in INSTABOX_ORG_ID.

Repository CI settings

  • Secret CLOUDFLARE_API_TOKEN: "Cloudflare Pages: Edit" on the personal account.
  • Variable CLOUDFLARE_ACCOUNT_ID: 7faed3182a72a299013d5d7c01434cbc.

Operations

sh
1bun test infra/ci-controller
2bunx wrangler deploy --config infra/ci-controller/wrangler.jsonc
3cafe ci dispatch ci.yml --ref main -R screen/theo-bench
4cafe runner list --repo screen/theo-bench