Part of #22.
ci.yml currently builds the site and uploads it as a workflow artifact — reviewers have to download and unzip to see a change. Every other lecture repo deploys a clickable PR preview.
Decision needed: Netlify or Cloudflare Pages?
- Cloudflare Pages (suggested for this repo): free for public and private repos, predictable per-PR URLs (
pr-N.<project>.pages.dev), supported by quantecon/actions/preview-cloudflare@v0.6.0. Needs a Pages project + CLOUDFLARE_API_TOKEN / CLOUDFLARE_ACCOUNT_ID secrets.
- Netlify (org-familiar): what the other lecture repos use today, via
quantecon/actions/preview-netlify@v0.6.0. Needs a site + NETLIFY_AUTH_TOKEN / NETLIFY_SITE_ID secrets.
Once decided, the change to ci.yml is small — replace the upload-artifact step with the chosen preview action and add pull-requests: write to the job permissions, e.g.:
- name: Deploy PR preview
uses: quantecon/actions/preview-cloudflare@v0.6.0
with:
cloudflare-api-token: ${{ secrets.CLOUDFLARE_API_TOKEN }}
cloudflare-account-id: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
project-name: lecture-dp
build-dir: ${{ steps.build.outputs.build-path }}
lectures-dir: lectures
Both actions post a PR comment with the preview URL and changed-lecture links, and skip fork PRs for secret safety.
🤖 Generated with Claude Code
Part of #22.
ci.ymlcurrently builds the site and uploads it as a workflow artifact — reviewers have to download and unzip to see a change. Every other lecture repo deploys a clickable PR preview.Decision needed: Netlify or Cloudflare Pages?
pr-N.<project>.pages.dev), supported byquantecon/actions/preview-cloudflare@v0.6.0. Needs a Pages project +CLOUDFLARE_API_TOKEN/CLOUDFLARE_ACCOUNT_IDsecrets.quantecon/actions/preview-netlify@v0.6.0. Needs a site +NETLIFY_AUTH_TOKEN/NETLIFY_SITE_IDsecrets.Once decided, the change to
ci.ymlis small — replace the upload-artifact step with the chosen preview action and addpull-requests: writeto the job permissions, e.g.:Both actions post a PR comment with the preview URL and changed-lecture links, and skip fork PRs for secret safety.
🤖 Generated with Claude Code