11name : Build Project [using jupyter-book]
22on : [pull_request]
33jobs :
4- deploy-runner :
5- runs-on : ubuntu-latest
6- steps :
7- - uses : iterative/setup-cml@v2
8- - uses : actions/checkout@v3
9- with :
10- ref : ${{ github.event.pull_request.head.sha }}
11- - name : Deploy runner on EC2
12- env :
13- REPO_TOKEN : ${{ secrets.QUANTECON_SERVICES_PAT }}
14- AWS_ACCESS_KEY_ID : ${{ secrets.AWS_ACCESS_KEY_ID }}
15- AWS_SECRET_ACCESS_KEY : ${{ secrets.AWS_SECRET_ACCESS_KEY }}
16- run : |
17- cml runner launch \
18- --cloud=aws \
19- --cloud-region=us-west-2 \
20- --cloud-type=p3.2xlarge \
21- --labels=cml-gpu \
22- --cloud-hdd-size=40
234 preview :
24- needs : deploy-runner
25- runs-on : [self-hosted, cml-gpu]
5+ runs-on : quantecon-gpu-runner
266 container :
27- image : docker://mmcky/ quantecon- lecture-python:cuda-12.3.1 -anaconda-2024-02-py311
7+ image : ghcr.io/ quantecon/ lecture-python-container :cuda-12.6.0 -anaconda-2024-10-py312
288 options : --gpus all
299 steps :
30- - uses : actions/checkout@v3
10+ - uses : actions/checkout@v4
3111 with :
3212 ref : ${{ github.event.pull_request.head.sha }}
3313 # Check nvidia drivers
4121 shell : bash -l {0}
4222 run : pip list
4323 - name : Download "build" folder (cache)
44- uses : dawidd6/action-download-artifact@v2
24+ uses : dawidd6/action-download-artifact@v6
4525 with :
4626 workflow : cache.yml
4727 branch : main
5535 mkdir -p _build/html/_notebooks
5636 cp -u _build/jupyter/*.ipynb _build/html/_notebooks
5737 - name : Upload Execution Reports (Download Notebooks)
58- uses : actions/upload-artifact@v2
38+ uses : actions/upload-artifact@v4
5939 if : failure()
6040 with :
6141 name : execution-reports
6747 mkdir -p _build/html/_pdf
6848 cp -u _build/latex/*.pdf _build/html/_pdf
6949 - name : Upload Execution Reports (LaTeX)
70- uses : actions/upload-artifact@v2
50+ uses : actions/upload-artifact@v4
7151 if : failure()
7252 with :
7353 name : execution-reports
@@ -78,13 +58,13 @@ jobs:
7858 run : |
7959 jb build lectures --path-output ./ -n -W --keep-going
8060 - name : Upload Execution Reports (HTML)
81- uses : actions/upload-artifact@v2
61+ uses : actions/upload-artifact@v4
8262 if : failure()
8363 with :
8464 name : execution-reports
8565 path : _build/html/reports
8666 - name : Preview Deploy to Netlify
87- uses : nwtgck/actions-netlify@v1.1
67+ uses : nwtgck/actions-netlify@v3.0
8868 with :
8969 publish-dir : ' _build/html/'
9070 production-branch : main
0 commit comments