Skip to content

Commit 2cff4d8

Browse files
committed
Merge branch 'opt-growth-fast-review' of https://github.com/QuantEcon/lecture-python.myst into opt-growth-fast-review
2 parents 217d5c1 + 9f1c5e2 commit 2cff4d8

File tree

4 files changed

+24
-11
lines changed

4 files changed

+24
-11
lines changed

.github/workflows/cache.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,13 +36,13 @@ jobs:
3636
run: |
3737
jb build lectures --path-output ./ -W --keep-going
3838
- name: Upload Execution Reports
39-
uses: actions/upload-artifact@v4
39+
uses: actions/upload-artifact@v5
4040
if: failure()
4141
with:
4242
name: execution-reports
4343
path: _build/html/reports
4444
- name: Upload "_build" folder (cache)
45-
uses: actions/upload-artifact@v4
45+
uses: actions/upload-artifact@v5
4646
with:
4747
name: build-cache
4848
path: _build

.github/workflows/ci.yml

Lines changed: 20 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@ on:
1111
jobs:
1212
preview:
1313
runs-on: "runs-on=${{ github.run_id }}/family=g4dn.2xlarge/image=quantecon_ubuntu2404/disk=large"
14+
env:
15+
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
16+
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}
1417
steps:
1518
- uses: actions/checkout@v5
1619
with:
@@ -57,7 +60,7 @@ jobs:
5760
mkdir -p _build/html/_notebooks
5861
cp -u _build/jupyter/*.ipynb _build/html/_notebooks
5962
- name: Upload Execution Reports (Download Notebooks)
60-
uses: actions/upload-artifact@v4
63+
uses: actions/upload-artifact@v5
6164
if: failure()
6265
with:
6366
name: execution-reports-notebooks
@@ -69,7 +72,7 @@ jobs:
6972
mkdir -p _build/html/_pdf
7073
cp -u _build/latex/*.pdf _build/html/_pdf
7174
- name: Upload Execution Reports (LaTeX)
72-
uses: actions/upload-artifact@v4
75+
uses: actions/upload-artifact@v5
7376
if: failure()
7477
with:
7578
name: execution-reports
@@ -80,7 +83,7 @@ jobs:
8083
run: |
8184
jb build lectures --path-output ./ -n -W --keep-going
8285
- name: Upload Execution Reports (HTML)
83-
uses: actions/upload-artifact@v4
86+
uses: actions/upload-artifact@v5
8487
if: failure()
8588
with:
8689
name: execution-reports
@@ -168,6 +171,11 @@ jobs:
168171
fi
169172
- name: Preview Deploy to Netlify
170173
id: netlify-deploy
174+
if: >
175+
github.actor != 'dependabot[bot]' &&
176+
(github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository) &&
177+
env.NETLIFY_AUTH_TOKEN != '' &&
178+
env.NETLIFY_SITE_ID != ''
171179
shell: bash -l {0}
172180
run: |
173181
if [ "${{ github.event_name }}" = "pull_request" ]; then
@@ -238,11 +246,16 @@ jobs:
238246
echo "🎯 Preview page: ${deploy_url}/${{ github.event.inputs.preview_page }}"
239247
fi
240248
fi
241-
env:
242-
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
243-
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}
249+
- name: Skip Netlify Deploy (no secrets or untrusted actor)
250+
if: >
251+
!(github.actor != 'dependabot[bot]' &&
252+
(github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository) &&
253+
env.NETLIFY_AUTH_TOKEN != '' &&
254+
env.NETLIFY_SITE_ID != '')
255+
run: |
256+
echo "Skipping Netlify preview deploy: secrets unavailable or actor not trusted (actor=${{ github.actor }})"
244257
- name: Post PR Comment with Preview Links
245-
if: github.event_name == 'pull_request'
258+
if: github.event_name == 'pull_request' && steps.netlify-deploy.outputs.deploy_url != ''
246259
uses: actions/github-script@v7
247260
with:
248261
script: |

.github/workflows/collab.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ jobs:
4545
run: |
4646
jb build lectures --path-output ./ -n -W --keep-going
4747
- name: Upload Execution Reports
48-
uses: actions/upload-artifact@v4
48+
uses: actions/upload-artifact@v5
4949
if: failure()
5050
with:
5151
name: execution-reports

.github/workflows/publish.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ jobs:
5959
run: |
6060
jb build lectures --path-output ./ --builder=custom --custom-builder=jupyter -n -W --keep-going
6161
zip -r download-notebooks.zip _build/jupyter
62-
- uses: actions/upload-artifact@v4
62+
- uses: actions/upload-artifact@v5
6363
with:
6464
name: download-notebooks
6565
path: download-notebooks.zip

0 commit comments

Comments
 (0)