Skip to content

ci: restore the automatic CDN purge on every push to main - #1653

Merged
vivek7405 merged 2 commits into
mainfrom
ci/restore-cdn-purge
Oct 28, 2026
Merged

vivek7405 merged 2 commits into
mainfrom
ci/restore-cdn-purge

Conversation

@vivek7405

Copy link
Copy Markdown
Collaborator

Closes #1652

What

  • .github/workflows/purge-cdn.yml runs on every push to main again (plus manual dispatch). The workflow body is unchanged: it waits for the Railway deployment of the pushed sha and purges only on SUCCESS, so a docs-only push Railway skips stays green with no purge (ci: gate the CDN purge on the real Railway deployment status #1192).
  • scripts/ci-merge.sh no longer starts scripts/purge-cdn.sh in the background; it prints where the purge runs.
  • scripts/release.sh purges only with the new --purge flag (replacing --no-purge), since the release commit's own push already runs the workflow.
  • framework-dev.md and the release.yml header describe the automatic purge.

Why

#1594 moved the purge to the merging machine. It skipped silently whenever that shell lacked CLOUDFLARE_API_TOKEN or held an expired Railway login, and never ran for a merge done anywhere else. The purges for #1649 and #1651 both failed that way. The repository secrets CLOUDFLARE_API_TOKEN and RAILWAY_TOKEN are still set.

Tests

  • New test/repo-health/purge-cdn-trigger.test.mjs with six assertions: the push trigger, the deploy lookup gated on push for the pushed sha, the purge and confirm steps gated on the deploy status, repository secrets, no local purge in ci-merge, and release.sh purging only on request.
  • Counterfactuals checked by hand. Each of these makes one test fail: dropping the push trigger, ungating the purge step, re-adding the background start in ci-merge, and defaulting release.sh to purge.
  • The related hook and repo-health suites pass (36 tests).

End-to-end proof

The merge commit of this PR is the first push the restored trigger sees. It touches only .github, scripts, test and markdown, so Railway should skip the deploy and the Purge CDN run should end green with a "no purge" notice. The next website merge after it is the first real purge.

#1594 moved the webjs.dev purge from purge-cdn.yml to the merging
machine, where ci-merge.sh started scripts/purge-cdn.sh in the
background. That skipped silently whenever the shell lacked
CLOUDFLARE_API_TOKEN or held an expired Railway login, and never ran
for a merge done anywhere else; the purges for #1649 and #1651 both
failed that way. CI is on Actions again and the repository secrets are
still set, so the workflow's push trigger comes back unchanged.

ci-merge.sh no longer starts a local purge, release.sh purges only with
--purge, and purge-cdn.sh stays as the manual tool.

Closes #1652
@pilots-run

pilots-run Bot commented Oct 28, 2026 •

Copy link
Copy Markdown

Preview for 78a924f was not built: compose file has unsupported keys

Next: fix the listed keys in the compose file

@vivek7405
vivek7405 marked this pull request as ready for review October 28, 2026 03:58
@vivek7405
vivek7405 merged commit 48d2776 into main Oct 28, 2026
10 of 11 checks passed
@vivek7405
vivek7405 deleted the ci/restore-cdn-purge branch October 28, 2026 04:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ci: restore the automatic CDN purge on every push to main

1 participant