Skip to content

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

Merged
mmcky merged 1 commit into
mainfrom
migrate-gh-pages-artifacts
Jul 8, 2026
Merged

INFR: Migrate GitHub Pages deploy to artifact-based workflow#353
mmcky merged 1 commit 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 the reference implementations in lecture-jax (#331) and lecture-python-intro. Part of the org-wide rollout tracked in QuantEcon/meta#282.

The repo is currently ~858 MB, largely gh-pages branch history — this migration lets us delete that branch after cutover for a large size reduction (lecture-python-intro went 767 MB → 16 MB).

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 three-step Create HTML archive → Upload to release → peaceiris/actions-gh-pages deploy block with a single quantecon/actions/publish-gh-pages@v0.6.0 step, which both uploads the release assets and deploys the Pages artifact.
  • Build steps, PDF/notebook assets, cache up/download, and the .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 (permanent, not subject to artifact expiry) and runs QuantEcon/action-link-checker against it — matching lecture-python-intro (meta#282 "Lesson convert to scroll-output #2: use release assets for linkcheck").
  • Removes the now-unused lychee.toml.

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-advanced.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-intro. This removes the gh-pages
branch dependency so the branch can be deleted, keeping the repo small
(currently ~858 MB).

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.

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) and run the
QuantEcon AI link checker against it, matching lecture-python-intro. The
now-unused lychee.toml is removed.

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 02:16
@netlify

netlify Bot commented Jul 8, 2026

Copy link
Copy Markdown

Deploy Preview for lustrous-melomakarona-3ee73e ready!

Name Link
🔨 Latest commit f976831
🔍 Latest deploy log https://app.netlify.com/projects/lustrous-melomakarona-3ee73e/deploys/6a4db309d69d690008059111
😎 Deploy Preview https://deploy-preview-353--lustrous-melomakarona-3ee73e.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

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

This PR migrates the repository’s GitHub Pages deployment to GitHub’s native artifact-based Pages workflow (removing the need for a gh-pages branch) and updates link checking to operate on the latest release HTML archive instead of checking out gh-pages.

Changes:

  • Update publish.yml to deploy via quantecon/actions/publish-gh-pages@v0.6.0, including workflow-level Pages/OIDC permissions and Pages concurrency.
  • Update linkcheck.yml to download/extract the latest release .tar.gz and run QuantEcon/action-link-checker on the extracted HTML.
  • Remove the now-unused lychee.toml.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
.github/workflows/publish.yml Switches deployment to artifact-based GitHub Pages via publish-gh-pages, adds required permissions/concurrency/environment wiring.
.github/workflows/linkcheck.yml Stops relying on gh-pages checkout; instead pulls the latest release HTML archive and runs the QuantEcon link checker on it.
lychee.toml Removed because Lychee is no longer used by the linkcheck workflow.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

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

github-actions Bot commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

@github-actions github-actions Bot temporarily deployed to pull request July 8, 2026 02:27 Inactive
@mmcky mmcky merged commit c919d9e into main Jul 8, 2026
10 checks passed
@mmcky mmcky deleted the migrate-gh-pages-artifacts branch July 8, 2026 02:33
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