[preview] Migrate to quantecon/actions/preview-netlify - #336
Merged
Merged
Conversation
Replace the third-party nwtgck/actions-netlify deploy with the org's own composite action quantecon/actions/preview-netlify@v0.8.0 (the same pin used in lecture-python.myst). It deploys via the Netlify CLI to a deterministic pr-<number> alias, posts a single self-updating PR comment with direct links to the changed lecture pages, and safely skips dependabot/fork PRs that can't access secrets. Requires a Node.js setup step, added before it. Also drop the redundant Preview Deploy step from collab.yml: that job's purpose is execution testing on the Colab runtime, and its second deploy to the same Netlify site raced ci.yml for the PR alias (and published a lesser build with no notebook/PDF assets). ci.yml now owns the single canonical preview. 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. |
There was a problem hiding this comment.
Pull request overview
This PR migrates the repository’s PR preview deployment to the organization-standard Netlify preview action and removes a redundant Netlify deploy from the Colab execution workflow to prevent racing/overwriting PR previews.
Changes:
- Replace
nwtgck/actions-netlify@v4withquantecon/actions/preview-netlify@v0.8.0in the main preview workflow and add a Node setup step. - Remove the Netlify deploy step from the Colab execution-checks workflow to avoid racing deployments to the same site/alias.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| .github/workflows/ci.yml | Switches preview deployment to quantecon/actions/preview-netlify and installs Node for the Netlify CLI dependency. |
| .github/workflows/collab.yml | Removes redundant Netlify preview deploy to eliminate PR preview alias races and degraded previews. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
📖 Netlify Preview Ready!Preview URL: https://pr-336--incomparable-parfait-2417f8.netlify.app Commit: Build Info
|
The preview-netlify action posts/updates the preview comment via actions/github-script, which needs a write-scoped GITHUB_TOKEN. Without an explicit permissions block the job inherits the org default, which 403s under read-only tokens. Mirror lecture-python.myst: contents: read + pull-requests: write. 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.
This adopts the org-standard preview action and removes a redundant, racing Netlify deploy.
What
ci.yml— migrate to the org action. Replaces the third-partynwtgck/actions-netlify@v4withquantecon/actions/preview-netlify@v0.8.0— the same version already used inlecture-python.myst. Asetup-nodestep is added because the action installs the Netlify CLI via npm. Inputs move tonetlify-auth-token/netlify-site-id/build-dir;lectures-dirdefaults tolectures, which matches this repo.collab.yml— drop the redundant preview deploy. Theexecution-checksjob exists to test execution on the Colab runtime image. It was also deploying_build/html/to the same Netlify site asci.yml, so the two jobs raced for the PR alias — and the Colab build omits the notebook and PDF download assets, so when it won the race the published preview was a degraded version.ci.ymlnow owns the single canonical preview.Why the new action is better
pr-<number>alias instead of racing on Netlify’sdeploy-preview-<number>.Verification
Both workflow files validate as well-formed YAML locally. The real exercise is a live PR run: the
previewjob builds on the GPU runner and deploys, so this PR itself is the end-to-end test — check that a single📖 Netlify Preview Ready!comment appears and that the changed-page links resolve.Follow-up (dashboard, not in this repo)
The
netlify[bot]native Deploy Preview is configured in the Netlify dashboard, not here, so it is unaffected by this change. To avoid two preview comments, disable Netlify’s automatic Deploy Previews in the site settings so this GitHub Actions preview is the only one.🤖 Generated with Claude Code