General: Migrate Pages deploy to GitHub Actions and refresh Node-20 actions#220
Conversation
|
Two things from comparing with the parallel sister-repo PRs (the capod equivalent is at d4rken-org/capod#556, with the most detail on the race in d4rken-org/permission-pilot#356): 1. No release → Pages chain — pre-existing race not fixedCurrent trigger is permission-pilot#356 documented the timing on that repo ("v2.1.0-rc0 missed by 22 min, v2.0.3-rc0 missed by 41 min"). Same race exists here. Fix: add a step in - name: Trigger GitHub Pages deployment
if: "!(github.event_name == 'workflow_dispatch' && inputs.dry_run)"
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: gh workflow run pages.yml --ref mainPlus The existing 2.
|
What changed
No user-facing behavior change. CI/CD maintenance to clear Node 20 deprecation warnings and a dead cache step before GitHub forces Node 24 on 2026-06-02 and removes Node 20 on 2026-09-16 (changelog).
Focused changes:
.github/workflows/pages.yml) replacing GitHub's auto pages-build-deployment (which still pinsactions/checkout@v4+actions/upload-artifact@v4on Node 20). Usesconfigure-pages@v6,jekyll-build-pages@v1.0.13,upload-pages-artifact@v5,deploy-pages@v5— all on Node 24 or Docker. Triggered onpush: main+workflow_dispatch, with aJEKYLL_GITHUB_TOKENenv on the build step (authenticatesjekyll-github-metadataagainst the GitHub API),if: github.ref == 'refs/heads/main'guard on the deploy job (prevents accidental deploys from feature branches viaworkflow_dispatch), per-job permissions split (top-levelcontents: read; deploy job addspages: write+id-token: write), and a sanity check (test -f _site/index.html && test -f _site/CNAME) before upload.release-tag.yml: a new step at the end of therelease-githubjob runsgh workflow run pages.yml --ref mainafter the GitHub Release is created. Required becauseCHANGELOG.mdis a Liquid template that loopssite.github.releases(the GitHub Releases API at build time, not file content), so the Pages site needs to rebuild after the release exists in the API. The naturalpush: maintriggered build runs beforerelease-tag.ymlfinishes creating the release and would publish a stale/changelog. The chain step fires throughworkflow_dispatch, which is one of the two events that bypass theGITHUB_TOKENrecursion restriction. Addsactions: writepermission onrelease-github.Gemfile/Gemfile.lockintofastlane/. The Jekyll Pages builder readsSOURCE/Gemfileand our rootGemfileonly declaredgem "fastlane", which conflicted withgithub-pages. Therelease-gplayjob now setsBUNDLE_GEMFILEandruby/setup-ruby'sworking-directorytofastlane;bundle exec fastlane …keeps running from the repo root so fastlane discovery is unchanged. Plus aVerify fastlane Bundler wiringstep that runs unconditionally soworkflow_dispatch dry_run=trueexercises the relocation end-to-end before the next real beta tag.softprops/action-gh-releasev2.5.0 → v3.0.0 inrelease-tag.yml. v3 is the only line that runs on Node 24; inputs we use (prerelease,tag_name,name,generate_release_notes,files) are unchanged.common-setup. Android Gradle Plugin 7+ no longer creates that path, soactions/cacheemittedPath Validation Error: Path(s) specified in the action for caching do(es) not existon every job without saving anything useful. We're on AGP 9.0.1._config.ymlcleanup: dropped the now-dead- Gemfile/- Gemfile.lockexcludes since the files no longer live at the root..gitignore: added_site/,.jekyll-cache/,vendor/bundle/for local Jekyll iteration.Mirrors sdmaid-se PR #2402 and capod PR #556 with one notable scope difference and one trigger-architecture difference vs capod:
push: main+ chain, notrelease: published+ chain. Capod usesrelease: publishedbecause they want only release-driven rebuilds; we follow sdmaid-se in also rebuilding on regularmainpushes (e.g. README/_config.yml/PRIVACY_POLICY.mdedits). The race againstrelease-tag.ymlexists either way; the chain trigger fixes it for both architectures.dorny/test-reporterv3 bump from sdmaid-se PR #2402 is dropped here — BlueMusic doesn't have atest-reports.ymlworkflow.Review checklist
gh api -X PUT repos/d4rken-org/bluemusic/pages -f build_type=workflowalready run;gh api repos/d4rken-org/bluemusic/pages --jq '{build_type,cname,https_enforced}'confirmedbuild_type=workflow,cname=bluemusic.darken.eu,https_enforced=true.Path Validation Errorfrom the dropped step.bluemusic.darken.eu/changelogstill renders the GitHub Releases changelog after the merge build.workflow_dispatchonTagged releaseswithdry_run=true: the newVerify fastlane Bundler wiringstep succeeds (proves the Gemfile relocation is wired correctly before any real beta tag).v*tag is the first end-to-end check ofaction-gh-releasev3.0.0 and the chain trigger — verify/changelogshows the new release shortly afterrelease-tag.ymlfinishes.