Skip to content

ci(site): move the site deploy off the Node 20 action runtime - #3048

Merged
colbymchenry merged 1 commit into
mainfrom
claude/deploy-site-node24-actions
Oct 30, 2026
Merged

colbymchenry merged 1 commit into
mainfrom
claude/deploy-site-node24-actions

Conversation

@colbymchenry

Copy link
Copy Markdown
Owner

Summary

Moves the site's "Deploy site to GitHub Pages" workflow off GitHub's deprecated Node 20 action runtime:

Step Before After Resolves today to
Checkout actions/checkout@v4 actions/checkout@v6 v6.1.0
Build withastro/action@v3 withastro/action@v6 v6.1.4
Deploy actions/deploy-pages@v4 actions/deploy-pages@v5 v5.0.1

The actions are pinned by major tag, the same way release.yml pins its own (actions/checkout@v6, actions/setup-node@v6, and so on). Nothing else in the workflow changes: triggers, permissions, concurrency, path: site and node-version: 22 all stay.

Merging this PR starts a deploy

The workflow runs on every push to main that touches site/** or .github/workflows/deploy-site.yml. The merge of this PR is therefore itself the first run on the new actions, and it deploys the live site. I haven't run the workflow, by dispatch or otherwise. Pushing this branch didn't start it either, because it only listens to main.

So the first deploy is your call:

  • merge when you can watch the run, or
  • merge with [skip actions] in the squash commit message, then start the deploy yourself with Actions → Deploy site to GitHub Pages → Run workflow.

#3044 changes site/package-lock.json, so its merge starts a deploy too, on whichever actions are on main at the time, unless it's skipped the same way. Its site build output is byte-identical to main's.

What to watch for in that first run

Build job:

  • "Check lockfiles" picks npm, and "Setup Node" installs Node 22.x. The action's own default is now 24, but this workflow sets 22.
  • "Install" (npm install) and "Build" (npm run build) run in site/, as before.
  • There are two new steps, "Restore Astro cache" and "Save Astro cache". The first run reports a cache miss and then saves site/node_modules/.astro. This is withastro/action's new default (cache: true, since v5.1); cache: false turns it off if a build ever looks stale.
  • "Upload Pages Artifact" is now upload-pages-artifact v5 with include-hidden-files: true, which runs the same tar as v3 did. The built site has no dotfiles anyway.
  • The run's annotations should no longer carry the Node 20 deprecation warning.

Deploy job:

  • "Deploy to GitHub Pages" should succeed and print https://colbymchenry.github.io/codegraph/. A quick look at the landing page, one docs page and the search box confirms it.
  • If anything fails, reverting this PR restores the old actions, and the revert's own push runs the deploy again with them.

Changed defaults, from each release's notes and action.yml

  • actions/checkout v5 and v6: Node 24, which needs runner 2.327.1 or newer (GitHub-hosted runners are). Persisted credentials now go to a separate file. v6.1.0's breaking change concerns only pull_request_target and workflow_run checkouts; this job runs on push and workflow_dispatch. v7 exists, but release.yml is on v6, and v7's changes are mainly that same fork-checkout block.
  • withastro/action v4 to v6: these are the diffs between action.yml at v3.0.2 and at v6.1.4.
    • The node-version default changed from 20 to 24. This workflow sets 22.
    • New optional inputs: build-cmd, cache (default true), cache-dir and out-dir (default dist, as before).
    • The Astro cache steps are new.
    • Inside, setup-node v4 becomes v7.1.0 (still cache: npm on site/package-lock.json), and upload-pages-artifact v3 becomes v5. Every action it uses is now pinned by SHA and runs on Node 24.
  • actions/deploy-pages v5: the only action.yml change from v4 is node20 to node24. v5.0.1 adds backoff to the status polling. Inputs and defaults are unchanged, and it still uses the pages: write and id-token: write permissions the workflow already grants.

Validation

  • The workflow YAML parses, with the same on: block (push to main on site/** and the workflow file, plus workflow_dispatch) and the same inputs.
  • The site builds locally with npm ci and astro build on Node 22: 21 pages.
  • Not run: the workflow itself, because any run deploys the live site.
  • No test suite run: this is a workflow-only change, and nothing in the build or the tests reads this file.
  • No CHANGELOG entry: CI only.

Credit

Thanks @Dashsoap, whose #881 flagged that this workflow was still on the Node 20 actions.

🤖 Generated with Claude Code

The "Deploy site to GitHub Pages" workflow still used
actions/checkout@v4, withastro/action@v3 (setup-node v4 and
upload-pages-artifact v3 inside) and actions/deploy-pages@v4, all on
GitHub's deprecated Node 20 action runtime.

It now uses actions/checkout@v6, withastro/action@v6 and
actions/deploy-pages@v5, all on Node 24, pinned by major tag as
release.yml pins its actions. The tags resolve today to checkout v6.1.0,
withastro/action v6.1.4 and deploy-pages v5.0.1. checkout stays on v6 to
match release.yml; v7 mainly blocks fork checkouts in
pull_request_target.

Changed defaults, read from each release's notes and action.yml:
- checkout v5 and v6: Node 24 (runner 2.327.1 or newer), and persisted
  credentials go to a separate file. The breaking change in v6.1.0
  concerns only pull_request_target and workflow_run checkouts, which
  this job doesn't do.
- withastro/action v4 to v6: the node-version default went from 20 to
  24; this workflow sets 22 and keeps it. Install and build are still
  npm install and npm run build in site/. A new Astro build cache
  (node_modules/.astro, on by default) is restored before the build and
  saved after. The upload is upload-pages-artifact v5 with
  include-hidden-files: true, which packs the same files v3 did, and
  the built site has no dotfiles anyway.
- deploy-pages v5: Node 24 and polling backoff; inputs unchanged.

Nothing else changes: triggers, permissions, concurrency, the site path
and node-version 22. The YAML parses, and the site builds locally with
Node 22 (21 pages). The workflow was not run, because a run deploys the
live site.

Raised by PR 881 (@Dashsoap).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@colbymchenry
colbymchenry merged commit 03c10ad into main Oct 30, 2026
@colbymchenry
colbymchenry deleted the claude/deploy-site-node24-actions branch October 30, 2026 15:49
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