Skip to content

INFR: Migrate GitHub Pages deploy to artifact-based workflow#953

Merged
mmcky merged 2 commits into
mainfrom
migrate-gh-pages-artifacts
Jul 8, 2026
Merged

INFR: Migrate GitHub Pages deploy to artifact-based workflow#953
mmcky merged 2 commits into
mainfrom
migrate-gh-pages-artifacts

Conversation

@mmcky

@mmcky mmcky commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

Summary

Migrates GitHub Pages deployment to the native, artifact-based workflow, matching lecture-jax (#331) and lecture-python-advanced.myst (#353). Part of the org-wide rollout tracked in QuantEcon/meta#282.

This repo is ~4.5 GB — by far the largest in the family, mostly gh-pages branch history — so deleting that branch after cutover should be the biggest single size reduction of the rollout.

Changes

publish.yml

  • Adds workflow-level permissions (pages: write, id-token: write for OIDC, plus contents: write / actions: read), a pages concurrency group, and the github-pages deployment environment.
  • Replaces the Create HTML archive → Upload to release → peaceiris/actions-gh-pages deploy block with a single quantecon/actions/publish-gh-pages@v0.6.0 step (uploads release assets and deploys the Pages artifact).
  • The GPU runner, JAX/Numpyro install, execution-report uploads, and .notebooks sync are unchanged.

linkcheck.yml

  • Previously checked out the gh-pages branch, which will no longer exist after cutover. Now downloads and extracts the latest release .tar.gz into _site and repoints lychee's --root-dir and glob there.
  • lychee is kept (not swapped for QuantEcon/action-link-checker) to preserve the tuned false-positive suppression from Link Checker Report #906 and Link Checker Report #933 (--accept 202, --exclude-path for genindex/search/prf-prf, the Journal of Derivatives DOI exclude). A follow-up issue tracks the eventual AI-checker upgrade.

Cutover checklist (post-merge, per meta#282)

  • Merge this PR
  • Settings → Pages → Source → GitHub Actions
  • Settings → Environments → github-pages → add tag rule publish*
  • Push a publish* tag → verify deploy + live site (python.quantecon.org)
  • Trigger linkcheck.yml (workflow_dispatch) → verify it reads the release asset
  • Delete the gh-pages branch

🤖 Generated with Claude Code

Replace the peaceiris/actions-gh-pages deploy with native, artifact-based
GitHub Pages deployment via quantecon/actions/publish-gh-pages@v0.6.0,
matching lecture-jax and lecture-python-advanced.myst. This removes the
gh-pages branch dependency so the branch can be deleted, reclaiming a
large amount of space (repo is currently ~4.5 GB).

The single publish-gh-pages step replaces the previous three-step
archive/upload-release/peaceiris-deploy block: it uploads the release
assets (create-release-assets) and deploys the Pages artifact via OIDC.
The GPU runner, execution-report uploads, and notebook sync are unchanged.

linkcheck.yml previously checked out the gh-pages branch, which will no
longer exist. Switch it to download and extract the latest release
.tar.gz (permanent, not subject to artifact expiry) into _site and point
lychee's --root-dir and glob there. lychee is kept (not swapped for the
QuantEcon AI checker) to preserve the tuned false-positive suppression
from #906 and #933; a follow-up issue tracks
the eventual AI-checker upgrade.

Part of the rollout tracked in QuantEcon/meta#282.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings July 8, 2026 03:03
@mmcky

mmcky commented Jul 8, 2026

Copy link
Copy Markdown
Contributor Author

Follow-up for the linkcheck engine upgrade (keep lychee here for now to preserve the #906/#933 tuning): #954

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Migrates this repository’s GitHub Pages publishing pipeline from a gh-pages branch deployment to GitHub’s native artifact-based Pages workflow (plus release asset uploads), and updates the link checker workflow to validate links against the latest release HTML archive instead of checking out gh-pages.

Changes:

  • Updated publish.yml to use quantecon/actions/publish-gh-pages@v0.6.0 (artifact-based Pages deploy + optional release assets) with appropriate workflow permissions, concurrency, and github-pages environment metadata.
  • Updated linkcheck.yml to download/extract the latest release HTML .tar.gz into _site and run lychee against that extracted site root.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
.github/workflows/publish.yml Switches Pages deploy to artifact-based workflow via quantecon/actions/publish-gh-pages, adds required permissions/concurrency/environment.
.github/workflows/linkcheck.yml Replaces gh-pages checkout with “download latest release archive → extract → run lychee with updated root-dir/glob”.

Comment thread .github/workflows/linkcheck.yml Outdated
Comment thread .github/workflows/linkcheck.yml
@github-actions

github-actions Bot commented Jul 8, 2026

Copy link
Copy Markdown

📖 Netlify Preview Ready!

Preview URL: https://pr-953--sunny-cactus-210e3e.netlify.app

Commit: 53c17a8


Build Info

…pipe

Make stdin extraction explicit (tar -xzf -) rather than relying on GNU
tar's compiled-in default archive device. Addresses Copilot review
feedback on #953.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
mmcky added a commit to QuantEcon/lecture-python-advanced.myst that referenced this pull request Jul 8, 2026
…pipe (#355)

Make stdin extraction explicit (tar -xzf -) rather than relying on GNU
tar's compiled-in default archive device. Backports the fix from
QuantEcon/lecture-python.myst#953 for consistency across the migrated
linkcheck workflows.

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@mmcky mmcky merged commit 45c3a00 into main Jul 8, 2026
1 check passed
@mmcky mmcky deleted the migrate-gh-pages-artifacts branch July 8, 2026 03:57
mmcky added a commit to QuantEcon/lecture-python-intro that referenced this pull request Jul 8, 2026
…pipe (#786)

Make stdin extraction explicit (tar -xzf -) rather than relying on GNU
tar's compiled-in default archive device. Backports the fix from
QuantEcon/lecture-python.myst#953 for consistency across the migrated
linkcheck workflows.

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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