Repository navigation
ci(site): move the site deploy off the Node 20 action runtime - #3048
Merged
Merged
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Moves the site's "Deploy site to GitHub Pages" workflow off GitHub's deprecated Node 20 action runtime:
actions/checkout@v4actions/checkout@v6withastro/action@v3withastro/action@v6actions/deploy-pages@v4actions/deploy-pages@v5The actions are pinned by major tag, the same way
release.ymlpins its own (actions/checkout@v6,actions/setup-node@v6, and so on). Nothing else in the workflow changes: triggers, permissions, concurrency,path: siteandnode-version: 22all stay.Merging this PR starts a deploy
The workflow runs on every push to
mainthat touchessite/**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 tomain.So the first deploy is your call:
[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 onmainat 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:
npm install) and "Build" (npm run build) run insite/, as before.site/node_modules/.astro. This is withastro/action's new default (cache: true, since v5.1);cache: falseturns it off if a build ever looks stale.include-hidden-files: true, which runs the sametaras v3 did. The built site has no dotfiles anyway.Deploy job:
Changed defaults, from each release's notes and
action.ymlpull_request_targetandworkflow_runcheckouts; this job runs onpushandworkflow_dispatch. v7 exists, butrelease.ymlis on v6, and v7's changes are mainly that same fork-checkout block.action.ymlat v3.0.2 and at v6.1.4.node-versiondefault changed from 20 to 24. This workflow sets 22.build-cmd,cache(defaulttrue),cache-dirandout-dir(defaultdist, as before).cache: npmonsite/package-lock.json), and upload-pages-artifact v3 becomes v5. Every action it uses is now pinned by SHA and runs on Node 24.action.ymlchange from v4 isnode20tonode24. v5.0.1 adds backoff to the status polling. Inputs and defaults are unchanged, and it still uses thepages: writeandid-token: writepermissions the workflow already grants.Validation
on:block (push tomainonsite/**and the workflow file, plusworkflow_dispatch) and the same inputs.npm ciandastro buildon Node 22: 21 pages.Credit
Thanks @Dashsoap, whose #881 flagged that this workflow was still on the Node 20 actions.
🤖 Generated with Claude Code