ci: Forgejo Actions runs the checks and MagicBeanAdmin/Release deploys main, CircleCI goes #24

Merged
HumanBean merged 2 commits from HumanBean/Site:ci/site-deploy-from-release into main 2026-11-28 00:35:03 +00:00
Owner

Why: Site's deploy is CircleCI's, with the Cloudflare token in its cloudflare-prod context, and the team is moving every deploy to
MagicBeanAdmin/Release, whose runners and secrets belong to that repository alone and whose jobs run nothing of the source
beside the token. This takes CircleCI out of the picture, so the seal broker and CircleCI can both go.

Work in progress: do not merge yet. The order matters, see "Before merging".

What changes

  • .forgejo/workflows/ci.yml (new): lint (pre-commit on every file, and each commit's subject as a Conventional Commit) and
    test (html-validate, the Matrix client file's JSON, wrangler deploy --dry-run) on every pull request and push to main,
    as CircleCI's lint and test ran them (mise run lint, mise run test). No secrets. A fork's pull request waits for a
    maintainer's approval, which Forgejo asks for itself: that replaces ci: approved and the Site-forks project.
  • .circleci/, .chunk/, the circleci CLI and conftest pins in mise.toml and mise.lock, the orb's validate task and the
    manual circleci-validate hook go. docs/ci.md, README.md and CONTRIBUTING.md describe the new flow.
  • The deploy is MagicBeanAdmin/Release's site.yml (MagicBeanAdmin/Release, branch websites: not on its main yet). It
    stamps the version as CircleCI did (YYYY.MM.DD.<run number>+<sha7>; the number is Release's run number now) and runs
    wrangler deploy with Release's pinned Wrangler on wrangler.jsonc and public/ only, as data, in a folder of its own: nothing of
    this repository runs beside the token, and a wrangler.jsonc that names another Worker or route, or a build command, is refused.

What is dropped, and the follow-up

  • CircleCI's Cloudflare preview (same-repo pull requests with the label ci: preview), its artifact preview and the
    deploy markers (CircleCI's Deploys page) end here. There is no replacement in this pull request. Proposed follow-up: a
    Release workflow site-preview.yml like Longshot's preview (release-trigger dispatches it from the pull request's webhook; it
    takes only the pull request's public/ as files, by git archive, beside main's wrangler.jsonc, and posts the link). It
    needs a new webhook and a bot token with write:issue, so it is kept out of this change.

Before merging (in this order)

  1. MagicBeanAdmin/Release's websites branch is merged, and release-trigger (MagicBeanDev/Infra's websites-trigger) is
    deployed with a webhook on this repository (push events), so a push to main starts site.yml.
  2. Release has the secrets CLOUDFLARE_API_TOKEN and CLOUDFLARE_ACCOUNT_ID. Run Release's Site workflow by hand with
    publish off (a dry run) and check it passes; the hourly and release-trigger's runs do nothing while .circleci/config.yml is
    on main, so nothing is deployed twice.
  3. This repository's branch protection: if ci/circleci: gate is a required check, replace it with CI / lint and CI / test, or
    nothing can merge.
  4. Merge. The commit that removes .circleci/config.yml is the switch: CircleCI builds nothing from then on, and release-trigger's
    run of that push (five minutes later) deploys it. Then disable the CircleCI project (and Site-forks and the forge webhook to
    it) and delete the cloudflare-prod and forgejo-bot contexts.

Testing

Run here: npm ci, html-validate and the Matrix JSON check, and wrangler deploy --dry-run on this tree, all pass;
actionlint on ci.yml; mise.toml and mise.lock parse and mise ls lists the remaining pins. Not run: ci.yml itself (it needs
a Forgejo runner; it is the first run of jdx/mise-action here), and the deploy (Release's tests cover its scripts against a made-up
forge and a made-up Wrangler; nothing was sent to Cloudflare).

🤖 Generated with Claude Code

Why: Site's deploy is CircleCI's, with the Cloudflare token in its `cloudflare-prod` context, and the team is moving every deploy to MagicBeanAdmin/Release, whose runners and secrets belong to that repository alone and whose jobs run nothing of the source beside the token. This takes CircleCI out of the picture, so the seal broker and CircleCI can both go. **Work in progress: do not merge yet.** The order matters, see "Before merging". ## What changes - `.forgejo/workflows/ci.yml` (new): lint (pre-commit on every file, and each commit's subject as a Conventional Commit) and test (html-validate, the Matrix client file's JSON, `wrangler deploy --dry-run`) on every pull request and push to `main`, as CircleCI's `lint` and `test` ran them (`mise run lint`, `mise run test`). No secrets. A fork's pull request waits for a maintainer's approval, which Forgejo asks for itself: that replaces `ci: approved` and the Site-forks project. - `.circleci/`, `.chunk/`, the `circleci` CLI and `conftest` pins in `mise.toml` and `mise.lock`, the orb's `validate` task and the manual `circleci-validate` hook go. `docs/ci.md`, `README.md` and `CONTRIBUTING.md` describe the new flow. - The deploy is MagicBeanAdmin/Release's `site.yml` (MagicBeanAdmin/Release, branch `websites`: not on its main yet). It stamps the version as CircleCI did (`YYYY.MM.DD.<run number>+<sha7>`; the number is Release's run number now) and runs `wrangler deploy` with Release's pinned Wrangler on `wrangler.jsonc` and `public/` only, as data, in a folder of its own: nothing of this repository runs beside the token, and a `wrangler.jsonc` that names another Worker or route, or a `build` command, is refused. ## What is dropped, and the follow-up - CircleCI's **Cloudflare preview** (same-repo pull requests with the label `ci: preview`), its **artifact preview** and the **deploy markers** (CircleCI's Deploys page) end here. There is no replacement in this pull request. Proposed follow-up: a Release workflow `site-preview.yml` like Longshot's preview (release-trigger dispatches it from the pull request's webhook; it takes only the pull request's `public/` as files, by `git archive`, beside main's `wrangler.jsonc`, and posts the link). It needs a new webhook and a bot token with `write:issue`, so it is kept out of this change. ## Before merging (in this order) 1. MagicBeanAdmin/Release's `websites` branch is merged, and release-trigger (MagicBeanDev/Infra's `websites-trigger`) is deployed with a webhook on this repository (push events), so a push to `main` starts `site.yml`. 2. Release has the secrets `CLOUDFLARE_API_TOKEN` and `CLOUDFLARE_ACCOUNT_ID`. Run Release's *Site* workflow by hand with **publish** off (a dry run) and check it passes; the hourly and release-trigger's runs do nothing while `.circleci/config.yml` is on `main`, so nothing is deployed twice. 3. This repository's branch protection: if `ci/circleci: gate` is a required check, replace it with `CI / lint` and `CI / test`, or nothing can merge. 4. Merge. The commit that removes `.circleci/config.yml` is the switch: CircleCI builds nothing from then on, and release-trigger's run of that push (five minutes later) deploys it. Then disable the CircleCI project (and Site-forks and the forge webhook to it) and delete the `cloudflare-prod` and `forgejo-bot` contexts. ## Testing Run here: `npm ci`, `html-validate` and the Matrix JSON check, and `wrangler deploy --dry-run` on this tree, all pass; `actionlint` on `ci.yml`; `mise.toml` and `mise.lock` parse and `mise ls` lists the remaining pins. Not run: `ci.yml` itself (it needs a Forgejo runner; it is the first run of `jdx/mise-action` here), and the deploy (Release's tests cover its scripts against a made-up forge and a made-up Wrangler; nothing was sent to Cloudflare). 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Lint (pre-commit on every file, and each commit's subject as a Conventional Commit) and test
(html-validate, the Matrix client file's JSON, wrangler deploy --dry-run) on every pull request and
push to main, as CircleCI ran them. No secrets: the deploy is MagicBeanAdmin/Release's.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
ci: CircleCI is gone; MagicBeanAdmin/Release deploys main
All checks were successful
CI / Lint (pull_request) Successful in 1m33s
CI / Test (pull_request) Successful in 24s
eeb8f83e07
Release's site.yml deploys main to Cloudflare Workers with the token in its own secrets, runs
nothing of this repository beside it (only wrangler.jsonc and public/, as data, with its own pinned
Wrangler) and stamps the same version into the footer. CircleCI's pipelines, the chunk config, the
circleci CLI and the orb's validate task go, with the docs about them. Pull request previews and fork
approvals are not replaced here: Forgejo asks for approval of a fork's run itself, and a preview is a
follow-up (docs/ci.md, Previews).

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Member

Possibly related, for context:

  • PR #19 ci: cut Site over to CircleCI (remove Forgejo Actions, live deploy) — Merged cutover to CircleCI; this PR reverses that deployment setup.
  • PR #6 ci: deploy magicbean.dev when main changes — Merged prior Forgejo main-deploy workflow; relevant precedent for moving deployment back.
Possibly related, for context: - PR #19 ci: cut Site over to CircleCI (remove Forgejo Actions, live deploy) — Merged cutover to CircleCI; this PR reverses that deployment setup. - PR #6 ci: deploy magicbean.dev when main changes — Merged prior Forgejo main-deploy workflow; relevant precedent for moving deployment back.
HumanBean changed title from WIP: ci: Forgejo Actions runs the checks and MagicBeanAdmin/Release deploys main, CircleCI goes to ci: Forgejo Actions runs the checks and MagicBeanAdmin/Release deploys main, CircleCI goes 2026-11-28 00:34:56 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
MagicBeanDev/Site!24
No description provided.