INFR: Migrate GitHub Pages deploy to artifact-based workflow - #331
Merged
Merged
Conversation
Replace the peaceiris/actions-gh-pages deploy with native, artifact-based GitHub Pages deployment via quantecon/actions/publish-gh-pages, matching the family reference (lecture-dp). This removes the gh-pages branch dependency so the branch can be deleted, keeping the repo small. The GPU build stays a single job (per the migration guide, GPU repos avoid the two-job build+deploy pattern to skip large artifact transfers). The manual HTML archive / checksum / manifest / action-gh-release steps are removed — the publish-gh-pages action now creates and uploads those release assets (asset-name: lecture-jax-html). The jax/GPU install, LaTeX PDF, download notebooks, and the lecture-jax.notebooks sync are unchanged. Requires a maintainer to switch Pages source to "GitHub Actions", add a publish* deployment tag rule to the github-pages environment, and delete gh-pages after a verified deploy. See QuantEcon/meta#282 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
✅ Deploy Preview for incomparable-parfait-2417f8 ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
12 tasks
There was a problem hiding this comment.
Pull request overview
Migrates the repository’s GitHub Pages publishing workflow from the legacy gh-pages branch deployment to an artifact-based Pages deployment, while preserving the existing single-job GPU build and notebook-sync steps.
Changes:
- Adds explicit
permissions,concurrency, andgithub-pagesenvironment configuration for native Pages deployments. - Replaces
peaceiris/actions-gh-pages(+ manual archive/release steps) withquantecon/actions/publish-gh-pages@v0.6.0to deploy and optionally create release assets.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
The explicit permissions block set all unlisted scopes to none, so the dawidd6/action-download-artifact step (which reads the build cache from cache.yml via the Actions API) had no actions:read. Add it so the cache download works reliably — important for this GPU build, where a cache miss means rebuilding every jax notebook from scratch. Matches the permissions example in QuantEcon/meta#282. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
mmcky
added a commit
to QuantEcon/continuous_time_mcs
that referenced
this pull request
Jul 8, 2026
The explicit permissions block set all unlisted scopes to none, so the dawidd6/action-download-artifact step (which reads the build cache from cache.yml via the Actions API) had no actions:read. The last publish still succeeded, but the scope is the documented requirement and matches the permissions example in QuantEcon/meta#282 — add it to guarantee the cache download and keep this in sync with lecture-jax. Ports the fix from QuantEcon/lecture-jax#331 (Copilot review follow-up). Co-authored-by: Claude Opus 4.8 (1M context) <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.
What
Migrates GitHub Pages deployment from the legacy
gh-pagesbranch method (peaceiris/actions-gh-pages) to native, artifact-based deployment, mirroring the family reference lecture-dp. See QuantEcon/meta#282 for the overall strategy.Why
The
gh-pagesbranch accumulates a full HTML snapshot on every publish, bloating the repo and slowing clones. Artifact-based deployment stores nothing in git — the deployed site lives in the Pages infrastructure — so the repo stays small and thegh-pagesbranch can be deleted.Changes (single file:
.github/workflows/publish.yml)pages/id-tokenpermissions and apagesconcurrency group; run thepublishjob in thegithub-pagesenvironment.peaceiris/actions-gh-pages@v4withquantecon/actions/publish-gh-pages@v0.6.0(handles the CNAMEjax.quantecon.organd creates release assets).action-gh-releasesteps — the action now produces those release assets (asset-name: lecture-jax-html).Unchanged: the single-job GPU build (
g4dn.2xlarge), the jax/CUDA install + GPU checks, LaTeX PDF, download-notebook build, and the sync tolecture-jax.notebooks. Per the migration guide, GPU repos keep a single job (rather than split build+deploy) to avoid transferring large build artifacts between runners.Note on release-asset filenames
The manifest/checksum filenames change slightly (the action names them
lecture-jax-html-checksum.txt/lecture-jax-html-manifest.jsonrather thanhtml-checksum.txt/html-manifest.json); the HTML tarball namelecture-jax-html-<tag>.tar.gzis unchanged. Nothing in the repo depends on the old names (there is no linkcheck workflow here).Required maintainer steps (settings — not in this PR)
The workflow change alone does not deploy. A repo admin must do the following, in order. Steps 2–3 must happen before the first tagged deploy or it will fail with "Tag is not allowed to deploy to github-pages due to environment protection rules."
publish*.publish-*tag to trigger a deploy, then verify: the site loads at https://jax.quantecon.org/, andgh api repos/QuantEcon/lecture-jax/pages --jq '.build_type'returnsworkflow.gh-pagesbranch:git push origin --delete gh-pages.Rollback
If anything goes wrong before
gh-pagesis deleted: set Settings → Pages → Source back to "Deploy from a branch" →gh-pages, and the previous site serves again immediately.🤖 Generated with Claude Code