Repository navigation
ci: upgrade workflow actions to Node24-compatible majors - #309
Conversation
Resolve the "Node.js 20 is deprecated" runner annotations by bumping all GitHub Actions to their latest Node24-based majors: - actions/checkout v4 -> v7 - actions/setup-python v5 -> v7 - actions/github-script v7 -> v9 - actions/upload-pages-artifact v3 -> v5 (wraps upload-artifact v7) - actions/upload-artifact v4 -> v7 - actions/cache (incl. restore/save) v4 -> v6 - julia-actions/setup-julia v2 -> v3 - tj-actions/changed-files v46.0.5 -> v47.0.6 actions/configure-pages@v6 and actions/deploy-pages@v5 are already the latest majors. quarto-dev/quarto-actions@v2 and r-lib/actions@v2 track their latest majors (v2.2.0 / v2) and are kept. Version-only change: no step logic, inputs, or permissions modified. Verified all eight workflow YAML files still parse. Refs: #306 Co-Authored-By: Claude Code <noreply@anthropic.com>
✅ QMD Format CheckNo new QMD tutorial files to check.
|
|
Root cause: Fix in progress: adding the |
The first deploy-pages run on main (merge of #308, run 37889595653) failed at "Deploy to GitHub Pages" with: HttpError: Missing environment. Ensure your workflow's deployment job has an environment. actions/deploy-pages requires the deployment job to target the github-pages environment; the legacy quarto publish gh-pages target never needed one, so neither workflow declared it. Add environment.name: github-pages to both build-deploy jobs. Refs: #306 Co-Authored-By: Claude Code <noreply@anthropic.com>
✅ QMD Format CheckNo new QMD tutorial files to check.
|
The github-pages environment protection rules only allow deployments from main (and legacy gh-pages), so a job targeting the environment fails on pull_request events (ref refs/pull/<n>/merge) before any step runs. Split the deploy steps into a separate deploy job with needs: build-deploy that only runs on push/schedule/dispatch. Co-Authored-By: Claude Code <noreply@anthropic.com>
✅ QMD Format CheckNo new QMD tutorial files to check.
|
🔧 修复 PR CI 失败:部署拆分为独立 job根因确认(来自 annotations): 仓库的 修复(c549e0b):将 Configure/Deploy Pages 步骤从
这也意味着 PR 不再依赖 environment 检查,CI 可以完全转绿。 🤖 Generated with Claude Code |
Summary
Two CI fixes bundled in one PR (both validated by the same CI runs):
resolve the "Node.js 20 is deprecated" runner annotations (issue 工程优化专项:站点存储瘦身 × CI 构建提速 × 工作流可扩展性(含实测数据与分阶段方案) #306,
Phase 0 item C5).
the first deploy-pages run on main (merge of ci: migrate Pages deploy to actions/deploy-pages #308) failed with
HttpError: Missing environmentbecause actions/deploy-pages requiresthe job to declare
environment: name: github-pages. The legacyquarto publish gh-pages target never needed one.
1. Action upgrades (version-only)
Already latest (kept): actions/configure-pages@v6, actions/deploy-pages@v5,
quarto-dev/quarto-actions@v2, r-lib/actions@v2. All upgraded majors
verified to declare
using: node24.2. Environment fix (additive, 10 lines)
Both publish workflow jobs get:
The
github-pagesenvironment already exists in the repo with a branchpolicy allowing
main(and legacygh-pages). This is the documentedrequirement of actions/deploy-pages.
Verification
the first fully-correct deploy-pages deploy.
Refs: #306, follow-up to #308
🤖 Generated with Claude Code