Skip to content

chore(ci): migrate deploy-website to official GitHub Pages actions#169

Merged
montfort merged 1 commit into
mainfrom
chore/ci-pages-official-actions
May 19, 2026
Merged

chore(ci): migrate deploy-website to official GitHub Pages actions#169
montfort merged 1 commit into
mainfrom
chore/ci-pages-official-actions

Conversation

@montfort
Copy link
Copy Markdown
Contributor

Summary

  • Replaces peaceiris/actions-gh-pages@v4 with the official GitHub Pages flow: actions/configure-pages@v5 + actions/upload-pages-artifact@v3 + actions/deploy-pages@v4. Splits into build + deploy jobs per the GitHub-recommended pattern.
  • Bumps actions/checkout@v4 → v6 and actions/setup-node@v4 → v5 to silence the Node.js 20 deprecation warning (jun 2026 cutoff). The release workflows are already on @v6.
  • Bumps runtime to Node 22 LTS (current LTS).
  • Tightens permissions to the minimum the official flow requires: contents: read, pages: write, id-token: write (OIDC for deploy-pages).

Breaking deployment change

After merging this PR, the GitHub Pages source must be switched manually:

Repo Settings → Pages → Source = GitHub Actions (currently "Deploy from a branch" → gh-pages)

The existing gh-pages branch is left untouched but stops being the publish target. The current site keeps serving from the gh-pages branch's last commit until the Settings flip — after the flip, the first run of this workflow will deploy from the workflow artifact.

Test plan

  • Merge → flip Pages source to "GitHub Actions" → trigger workflow_dispatch
  • CI run shows no Node.js 20 deprecation warnings
  • Site at https://strangedaystech.github.io/straymark/ continues to serve the same content
  • Build job produces a Pages artifact; deploy job publishes it

🤖 Generated with Claude Code

- Replace `peaceiris/actions-gh-pages@v4` with the official Pages flow:
  `actions/configure-pages@v5` + `actions/upload-pages-artifact@v3` +
  `actions/deploy-pages@v4`. Split into `build` + `deploy` jobs per the
  GitHub-recommended pattern.
- Bump `actions/checkout@v4 → v6` and `actions/setup-node@v4 → v5` to
  silence the Node.js 20 deprecation warning (jun 2026 cutoff). Both
  release workflows are already on `checkout@v6`.
- Bump runtime Node to 22 LTS (current LTS; 20 enters maintenance soon).
- Permissions rewritten to the minimum required by the official flow:
  `contents: read`, `pages: write`, `id-token: write` (OIDC for
  deploy-pages).

**Breaking deployment-mechanism change**: after merging, GitHub Pages
Settings → Pages → Source must switch from "Deploy from a branch"
(gh-pages) to "GitHub Actions". The current `gh-pages` branch is left
intact but stops being the publish target.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@montfort montfort merged commit ec64162 into main May 19, 2026
1 check passed
montfort added a commit that referenced this pull request May 19, 2026
Distill the operational knowledge accumulated across PRs #169#171 into
a new top-level §Website section in CLAUDE.md so future sessions don't
have to rediscover it.

Sections added:
- Layout of `website/` and what each subdir is for.
- npm scripts table (start/build/sync:docs/migrate:blog/clear/typecheck/
  write-translations).
- i18n: how locales are wired (locales array, code.json, blog
  translations, docs mirror via sync:docs, theme overrides).
- Deploy pipeline (`deploy-website.yml` jobs + permissions, repo-side
  Pages config with `build_type=workflow` / `cname` / `https_enforced`).
- Custom domain workflow (CNAME + url + API cname must all change
  together).
- Build gotchas: slow-tail, no-parallel builds, avoid pipe-to-tail,
  `exclude` semantics, Pages source migration trap.
- Verification commands for deploys.

Internal docs only (`CLAUDE.md` is not shipped to adopters).

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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.

1 participant