From 6ffdb372e52b8486c892fb3606acb403f69639f4 Mon Sep 17 00:00:00 2001 From: Kasun Vithanage Date: Wed, 16 Sep 2026 13:57:46 +0530 Subject: [PATCH] ci: trigger a Cloudflare site deploy after the release updates the changelog The changelog commit carries a skip-ci marker, which Cloudflare honours, so the site's What's new stayed on the previous version until an unrelated push to main. POST the CF_DEPLOY_HOOK secret once that commit is pushed; skip if the secret is unset. --- .github/workflows/release.yml | 10 ++++++++++ CLAUDE.md | 7 ++++--- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index b679c80..fb56d6d 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -81,3 +81,13 @@ jobs: git commit -m "docs(changelog): update for ${GITHUB_REF_NAME} [skip ci]" git push origin main fi + + # The site's "What's new" reads CHANGELOG.md at build time, and the commit above carries + # [skip ci], so ask Cloudflare Pages for a fresh build. Set the CF_DEPLOY_HOOK secret to the + # deploy hook URL (Pages project → Settings → Builds → Deploy hooks). + - name: Redeploy the site + env: + CF_DEPLOY_HOOK: ${{ secrets.CF_DEPLOY_HOOK }} + run: | + if [ -z "$CF_DEPLOY_HOOK" ]; then echo "CF_DEPLOY_HOOK secret not set; skipping"; exit 0; fi + curl -fsS -X POST "$CF_DEPLOY_HOOK" >/dev/null && echo "Cloudflare deploy triggered" diff --git a/CLAUDE.md b/CLAUDE.md index 0447244..699b1a6 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -34,9 +34,10 @@ open Package.swift # opens the package in Xcode for GUI editing / previ - **Tests:** `swift test` (Swift Testing; `@testable import Tic` works on the executable target — no separate library). `Assets/` holds source icon art (AppIcon / Flat / MenuBar); the menu-bar glyph is also copied to `Sources/Tic/Resources/MenuBarIcon.png` and bundled via SwiftPM. -- **CI/Release:** `.github/workflows/` — `ci.yml` (build + test + lint), `changelog.yml` - (git-cliff updates `CHANGELOG.md` on main), `release.yml` (push a `v*` tag → builds `Tic.app`, - git-cliff release notes, publishes a GitHub Release). +- **CI/Release:** `.github/workflows/` — `ci.yml` (build + test + lint) and `release.yml` (push a + `v*` tag → builds `Tic.app`, git-cliff release notes, publishes a GitHub Release, commits the + regenerated `CHANGELOG.md` to main, then POSTs the `CF_DEPLOY_HOOK` secret so the site's + What's new rebuilds — that commit is `[skip ci]`, which Cloudflare honours). - To launch headlessly for a no-crash smoke check (the GUI can't be screenshotted from a sandbox), run `.build/debug/Tic` in the background and grep its stderr for the `[Tic] restored N note panel(s)` log line.