Skip to content

ci: move GitHub Actions to their Node 24 majors - #9

Merged
mmcky merged 2 commits into
mainfrom
maint/node24-actions
Sep 18, 2026
Merged

mmcky merged 2 commits into
mainfrom
maint/node24-actions

Conversation

@mmcky

@mmcky mmcky commented Sep 18, 2026 •

Copy link
Copy Markdown
Contributor

Moves every GitHub Actions pin in docs.yml onto its Node 24 major, moves the repository's own Node from 20 to 24, and adds a Dependabot config so the pins do not fall behind again. Node 20 reached end of life on 2026-04-30, and GitHub removes the runners' Node 20 opt-out on 2026-09-23. This is part of the Node 24 upgrade across the QuantEcon lecture and theme fleets; the owner decided on 2026-09-18 to keep this repository and bump it.

Pins

Workflow Action From To
docs.yml actions/checkout v4 (v4.4.0, node20) v7 (v7.0.1, node24)
docs.yml actions/setup-python v5 (v5.6.0, node20) v7 (v7.0.0, node24)
docs.yml actions/setup-node v4 (v4.4.0, node20) v7 (v7.0.0, node24)
docs.yml actions/upload-pages-artifact v3 (v3.0.1, composite wrapping upload-artifact@v4, node20) v5 (v5.0.0, composite wrapping upload-artifact v7.0.0, node24)
docs.yml actions/deploy-pages v4 (v4.0.5, node20) v5 (v5.0.1, node24)

Each target's action.yml was read at the new ref: the node actions declare runs.using: node24, and upload-pages-artifact v5 is a composite whose only uses: is actions/upload-artifact at the v7.0.0 SHA, which is node24.

Node for the build itself

File From To
docs.yml setup-node node-version: "20" node-version-file: .nvmrc
.nvmrc 20.11.0 24.21.0
pyproject.toml [tool.sphinx-theme-builder] node-version 20.11.0 24.21.0

24.21.0 is the current Node 24 LTS (Krypton, released 2026-09-07), written in full to keep .nvmrc's existing style. The pyproject.toml line is not a workflow pin, but it is the Node that actually compiles the theme's assets in CI: pip install -e ".[doc]" runs sphinx-theme-builder, which creates its own nodeenv at exactly that version and checks it matches. Moving .nvmrc without it would leave the two disagreeing and the build still on Node 20, so they move together.

docs.yml reads .nvmrc rather than naming a version of its own (87d7990, after review), so the Node that runs npm ci and the webpack build is the same 24.21.0 as local development and sphinx-theme-builder. A floating "24" had resolved to 24.20.0 from the runner's tool cache. pyproject.toml remains a separate pin that sphinx-theme-builder reads for itself, so it and .nvmrc still have to move together on the next Node bump.

What crossing these majors changes here

  • upload-pages-artifact v4 and v5 exclude dotfiles from the artifact unless include-hidden-files: true is set. For sphinx-build -b html docs docs/_build/html that drops only .buildinfo and the .doctrees/ pickle cache, neither of which the site serves; the docs have no .nojekyll or .well-known (and an artifact deployment does not run Jekyll).
  • setup-python v7 removes the pip-install input, which is not used. setup-node v5 to v7 changes automatic caching (there is no packageManager field, and cache: npm is already explicit), removes always-auth and stops exporting a placeholder NODE_AUTH_TOKEN; none of these is used.
  • checkout v6 and v7 change where the token is stored and block fork-PR checkouts under pull_request_target or workflow_run. docs.yml reads no git credentials and uses neither trigger.
  • deploy-pages v5 only moves the runtime. The workflow's pages: write and id-token: write permissions are unchanged.

Dependabot

.github/dependabot.yml checks github-actions weekly, in the grouped form QuantEcon/actions uses: one PR for minor and patch updates and one for majors, so at most two PRs a week. npm is left out of this PR.

What this PR's CI proves

docs.yml is this repository's only workflow and runs on push to main and workflow_dispatch, so this PR runs no check of its own. I dispatched docs.yml on maint/node24-actions: that exercises the build job (checkout, setup-python, setup-node and upload-pages-artifact, plus the sphinx-theme-builder asset build on Node 24.21.0). The github-pages environment only allows deployments from main, so the deploy job is expected to be refused on the branch; deploy-pages@v5 is proven only by the run after merge. The dispatch result is in the next section.

Dispatch results (2026-09-18)

First run, 35319503664, workflow_dispatch on maint/node24-actions:

Job Result
build passed in 44s
deploy refused, as expected: "Branch "maint/node24-actions" is not allowed to deploy to github-pages due to environment protection rules."

The build job ran checkout v7, setup-python v7, setup-node v7 and upload-pages-artifact v5 (including its inner upload-artifact v7.0.0), and uploaded the github-pages artifact (1,900,067 bytes). The run carries no "Node.js 20 is deprecated" annotation; the 2026-09-04 run on main listed checkout@v4, setup-node@v4, setup-python@v5, upload-artifact@v4 and deploy-pages@v4. The editable install succeeded, which means sphinx-theme-builder's nodeenv came up on exactly Node 24.21.0, since its version check refuses any mismatch. In this first run setup-node resolved "24" to 24.20.0 from the runner's tool cache; that Node runs npm ci and the webpack build, which compiled with the same single Sass legacy-API deprecation warning the main run already had. The only other annotation is GitHub's notice that ubuntu-latest moves to Ubuntu 26 from 2026-10-19, which is unrelated to this PR.

Second run, 35335092926, on 87d7990 after the switch to node-version-file: build passed in 56s and deploy was refused on the same environment rule. setup-node logged "Resolved .nvmrc as 24.21.0", downloaded 24.21.0 and reported node: v24.21.0 (npm 11.19.0), and the github-pages artifact came to 1,900,068 bytes. Its only annotations are the same two: the refused deploy and the Ubuntu 26 notice.

🤖 Generated with Claude Code

Node 20 reached end of life on 2026-04-30, and GitHub removes the Node 20
runtime opt-out on 2026-09-23.

- docs.yml: actions/checkout v4 -> v7, actions/setup-python v5 -> v7,
  actions/setup-node v4 -> v7, actions/upload-pages-artifact v3 -> v5,
  actions/deploy-pages v4 -> v5
- docs.yml: the job's Node moves from "20" to "24"
- .nvmrc and pyproject.toml [tool.sphinx-theme-builder] node-version:
  20.11.0 -> 24.21.0, the current Node 24 LTS. sphinx-theme-builder
  builds the assets with its own nodeenv at the pyproject version during
  `pip install -e`, so the two pins move together
- Add a grouped weekly github-actions Dependabot config

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Copilot AI lite review requested due to automatic review settings September 18, 2026 07:27

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

CI currently uses a floating node-version: "24" while the repo pins 24.21.0 elsewhere, which can make builds non-reproducible and drift unexpectedly as new 24.x releases ship.

Get a fresh assessment by requesting another Copilot review.

Pull request overview

Updates the repository’s CI and build toolchain to Node 24 by moving the GitHub Actions used in the Pages documentation workflow onto their Node 24-backed majors, aligning the repo’s pinned Node version, and adding Dependabot automation to keep workflow action pins current going forward.

Changes:

  • Bump GitHub Actions in docs.yml to newer majors (checkout@v7, setup-python@v7, setup-node@v7, upload-pages-artifact@v5, deploy-pages@v5).
  • Move the repo’s pinned Node version from 20.11.0 to 24.21.0 (.nvmrc and pyproject.toml sphinx-theme-builder config).
  • Add .github/dependabot.yml to automate GitHub Actions updates with grouped minor/patch vs major PRs.
File summaries
File Description
pyproject.toml Updates sphinx-theme-builder’s pinned Node version to 24.21.0.
.nvmrc Updates developer/local Node pin to 24.21.0.
.github/workflows/docs.yml Moves workflow action majors to Node 24-backed versions and bumps CI Node major to 24.
.github/dependabot.yml Adds Dependabot configuration to keep workflow action pins from falling behind.
Review details
  • Files reviewed: 4/4 changed files
  • Comments generated: 1
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread .github/workflows/docs.yml Resolved
.nvmrc and sphinx-theme-builder's node-version in pyproject.toml both
pin 24.21.0, but the docs workflow asked setup-node for any 24.x, so
the Pages build could run a different Node patch from local builds.
Reading .nvmrc keeps the three in step from one file.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
@mmcky
mmcky merged commit a3abdc5 into main Sep 18, 2026
1 of 2 checks passed
@mmcky
mmcky deleted the maint/node24-actions branch September 18, 2026 11:23
mmcky added a commit to QuantEcon/quantecon-book-theme that referenced this pull request Sep 18, 2026
* build: compile theme assets on Node 24

sphinx-theme-builder installs the Node pinned in pyproject.toml
([tool.sphinx-theme-builder] node-version) into .nodeenv/ and uses it
for npm install and webpack in every wheel build: the PyPI release in
tests.yml, the CI and docs installs, and local installs. That pin was
still 20.18.0 after #401 moved setup-node and .nvmrc to Node 24, so
the shipped assets were still compiled on Node 20.

Move the pin to 24.21.0, the current Node 24 LTS (Krypton), the same
pin QuantEcon/quantecon-sphinx-theme#9 set. .nvmrc moves from "24" to
the same exact version, as that repository did, so nvm gives local
development the Node the build uses. sphinx-theme-builder refuses a
nodeenv whose node --version differs from the pin, so the two pins
cannot drift silently in the build, only in .nvmrc.

Built locally with python -m build and pip wheel . on both pins, the
wheels' contents are identical, compiled CSS, JS and source maps
included. The seven npm EBADENGINE warnings the Node 20.18.0 install
printed (sass-loader 17 wants >= 22.11.0, among others) are gone.

The troubleshooting example in docs/developer/setup.md now shows the
mismatch error an existing .nodeenv/ will raise after this change.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>

* docs(changelog): name the two costs of the Node 24 pin

A source build now needs a platform nodejs.org ships a Node 24 binary
for, which excludes linux-armv7l and 32-bit Windows (both have Node
20.18.0 builds, neither has 24.21.0); the py3-none-any wheel is
unaffected. And with .nvmrc pinned exactly, nvm use needs one nvm
install per bump.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>

---------

Co-authored-by: Claude Opus 5 (1M context) <[email protected]>

This branch had an error being deployed

1 failed deployment
github-pages — 87d7990a Deployed Sep 18, 2026 by mmcky via deploy #4
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.

2 participants