Repository navigation
ci: migrate Pages deploy to actions/deploy-pages - #308
Merged
Merged
Conversation
Replace quarto publish --target gh-pages with the official actions/deploy-pages flow (upload-pages-artifact, configure-pages, deploy-pages) in both publish workflows. Motivation: the legacy gh-pages target force-pushes the entire rendered site (~493 MB) to the gh-pages branch on every deploy, growing the repository history indefinitely. This is the main driver of repository growth tracked in issue #306 (item A1). With this change the site is packaged as the github-pages artifact and deployed directly to the github-pages environment. The Upload Quarto artifacts step keeps its original conditions; Configure/Deploy are skipped for pull_request events (same conditions as the previous deploy step). Note: after this migration is verified live, the gh-pages branch can be deleted (Pages source switches from branch-based to workflow-based automatically on the first deploy-pages run). Refs: #306 Co-Authored-By: Claude Code <noreply@anthropic.com>
Contributor
✅ QMD Format CheckNo new QMD tutorial files to check.
|
Member
Author
|
CI verification complete on this PR — all green ✅
Deploy path (Configure Pages → Deploy to Pages) will execute on the first merge push to main. After merge I will verify the first deploy-pages run and the live site before deleting the gh-pages branch. |
ShixiangWang
added a commit
that referenced
this pull request
Oct 9, 2026
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>
ShixiangWang
added a commit
that referenced
this pull request
Oct 9, 2026
* ci: upgrade workflow actions to Node24-compatible majors 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> * fix: require github-pages environment for deploy-pages job 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> * fix: move Pages deploy to dedicated job gated on non-PR events 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> --------- Co-authored-by: Claude Code <noreply@anthropic.com>
ShixiangWang
added a commit
that referenced
this pull request
Oct 9, 2026
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>
ShixiangWang
added a commit
that referenced
this pull request
Oct 9, 2026
* fix: require github-pages environment for deploy-pages job 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> * fix: move Pages deploy to dedicated job gated on non-PR events 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> * fix: resolve build warnings from the website render pipeline - ManhattanPlot.qmd / ManhattanPlot.zh.qmd: restore the mangled opening fence of the {#fig-HistApplications} div (was a bare "fig-HistApplications}" line, leaking a literal closing ::: that triggered Quarto's fenced-div warning and rendered stray text on the page) - index.qmd: point template links at the rendered .html files; the .qmd hrefs produced "Unable to resolve link target" warnings on every render (rendered output is unchanged - Quarto rewrites both to the same URL) - workflows: drop the vestigial "Cache R packages" step; its renv paths never exist on the runner, so every run logged a cache path validation error and the cache was never saved. R packages are already cached by the r-lib/actions/setup-r-dependencies composite action - update-dependencies.R: print warnings as they occur (options(warn=1)) so the recurring "There were 13 warnings" session summary becomes actionable in CI logs Co-Authored-By: Claude Code <noreply@anthropic.com> --------- Co-authored-by: Claude Code <noreply@anthropic.com>
16 of 21 tasks
ShixiangWang
added a commit
that referenced
this pull request
Oct 9, 2026
#311) * fix: require github-pages environment for deploy-pages job 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> * fix: move Pages deploy to dedicated job gated on non-PR events 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> * fix: resolve build warnings from the website render pipeline - ManhattanPlot.qmd / ManhattanPlot.zh.qmd: restore the mangled opening fence of the {#fig-HistApplications} div (was a bare "fig-HistApplications}" line, leaking a literal closing ::: that triggered Quarto's fenced-div warning and rendered stray text on the page) - index.qmd: point template links at the rendered .html files; the .qmd hrefs produced "Unable to resolve link target" warnings on every render (rendered output is unchanged - Quarto rewrites both to the same URL) - workflows: drop the vestigial "Cache R packages" step; its renv paths never exist on the runner, so every run logged a cache path validation error and the cache was never saved. R packages are already cached by the r-lib/actions/setup-r-dependencies composite action - update-dependencies.R: print warnings as they occur (options(warn=1)) so the recurring "There were 13 warnings" session summary becomes actionable in CI logs Co-Authored-By: Claude Code <noreply@anthropic.com> * perf: deduplicate zh figures and drop source maps from deploy artifact Phase 1 of issue #306: shrink the deployed site (current artifact ~318 MB) without touching rendered content. - Rewrite zh figure references to share the English figure trees (.github/scripts/rewrite-zh-figure-refs.py). The previous "Fix zh page figure files" step copied every English <name>_files/ tree into the zh output directory (~80 MB of duplicated PNGs in the artifact); the new step rewrites each *.zh_files/ reference to the relative path of the identical existing English figure. References without an English counterpart are left untouched and counted. - Delete *.map source maps from _site before upload. They are browser-devtools-only files and have no effect on the rendered site. Co-Authored-By: Claude Code <noreply@anthropic.com> --------- Co-authored-by: Claude Code <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
Migrate GitHub Pages deployment from the legacy quarto publish gh-pages
target to the official actions/deploy-pages flow in both publish
workflows (issue #306, item A1).
Problem
The current deploy step (quarto-dev/quarto-actions/publish@v2 with
target gh-pages) force-pushes the entire rendered site (~493 MB) to the
gh-pages branch on every deploy. With 434 commits on gh-pages, this is
the single largest driver of repository growth tracked in issue #306.
Every deploy permanently appends a full site snapshot to git history.
Change
Replace the quarto publish action with the official three-step Pages
flow in both workflows (quarto-publish.yml, quarto-publish-update-cache.yml):
artifact (keeps its original step conditions)
github-pages environment
Configure/Deploy steps are skipped for pull_request events (same
conditions as the previous deploy step), so PR preview builds are
unaffected. Both workflows already declare the required pages write and
id-token write permissions, and the github-pages environment exists in
the repo.
Expected benefit
history.
gh-pages branch (434 commits, ~493 MB tip) can be deleted entirely.
Verification plan
skip on PR).
successfully and the live site works, then delete the gh-pages branch
in a follow-up step.
Refs: #306
🤖 Generated with Claude Code