ci: deploy the site to pages.dev from instabox runners#2

merged2
main
feat/theo-bench-website
opened17d agobySScreen

Summary

The site had no hosting. Now every push and PR runs tests and the build on a fresh Instabox box, and pushes to main deploy dist to theo-bench.pages.dev on the personal Cloudflare account.

mermaid
1sequenceDiagram
2 participant GC as Git Cafe
3 participant W as theo-bench-ci Worker
4 participant IB as Instabox
5 GC->>W: workflow_job queued (signed webhook)
6 W->>IB: create box
7 W->>GC: repo registration token
8 W->>IB: install ephemeral runner
9 IB->>GC: run one job: test, build, deploy if main
10 W->>IB: delete box when the job ends

The controller in infra/ci-controller/ is a copy of the astro-dither one, changed for a personal repo. Git Cafe's one-job (JIT) runner endpoint needs a runner group, and only organizations have those, so the runner registers with a repository token and --ephemeral instead.

bun run deploy builds and deploys from a local machine too.

Evidence

  • Before: runs #1 and #2 queued forever. The box was created, the JIT call failed with No such runner group, and the controller deleted the box. After: run #3 actwfrun_01m7fwttp8ecrtz7szh7k7zq9x passed on box theo-bench-actjob-01m7fwttt2fsaabbvdjg9q0wb8. Deploy was skipped on the branch as intended, the runner unregistered and the box was deleted.
  • bun test: 7 pass, including a new test that the runner setup script refuses a token or URL that could break out of it.

Merge Danger

Door: two-way

Merging triggers the first production deploy to theo-bench.pages.dev. Revert the merge or roll back the deployment in the Pages dashboard.

Blast Radius: hosting

The Worker, webhook, Pages project and CI secrets are already live and stay in place whether or not this merges. The Instabox key and Git Cafe token expire around 13 February 2027.

Created with Claude Opus 5.5 in Claude Code.

🤖 Generated with Claude Code

Checks

6 successful
All checks passed
92e6a9c

Added 2 commits

  • ci: deploy to Cloudflare Pages from Git Cafe on Instabox runners610e420
  • fix(ci): register ephemeral runners with a repository registration token92e6a9c