@@ -17,17 +17,17 @@ concurrency:
1717jobs :
1818 publish :
1919 if : github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags')
20- runs-on : " runs-on=${{ github.run_id }}/family=g4dn.2xlarge/image=quantecon_ubuntu2404/disk=large "
20+ runs-on : " runs-on=${{ github.run_id }}/family=g4dn.2xlarge/image=quantecon_ubuntu2404/volume=80gb "
2121 environment :
2222 name : github-pages
23- url : ${{ steps.deployment.outputs.page_url }}
23+ url : ${{ steps.deployment.outputs['page-url'] }}
2424 steps :
2525 - name : Checkout
26- uses : actions/checkout@v6
26+ uses : actions/checkout@v7
2727 with :
2828 fetch-depth : 0 # Fetch full git history for changelog feature
2929 - name : Setup Anaconda
30- uses : conda-incubator/setup-miniconda@v3
30+ uses : conda-incubator/setup-miniconda@v4
3131 with :
3232 auto-update-conda : true
3333 auto-activate-base : true
6666 run : pip list
6767 # Download Build Cache from cache.yml
6868 - name : Download "build" folder (cache)
69- uses : dawidd6/action-download-artifact@v20
69+ uses : dawidd6/action-download-artifact@v21
7070 with :
7171 workflow : cache.yml
7272 branch : main
@@ -101,43 +101,16 @@ jobs:
101101 shell : bash -l {0}
102102 run : |
103103 jb build lectures --path-output ./ -n -W --keep-going
104- # Create HTML archive for release assets
105- - name : Create HTML archive
106- shell : bash -l {0}
107- run : |
108- tar -czf lecture-python-programming-html-${{ github.ref_name }}.tar.gz -C _build/html .
109- sha256sum lecture-python-programming-html-${{ github.ref_name }}.tar.gz > html-checksum.txt
110-
111- # Create metadata manifest
112- cat > html-manifest.json << EOF
113- {
114- "tag": "${{ github.ref_name }}",
115- "commit": "${{ github.sha }}",
116- "timestamp": "$(date -Iseconds)",
117- "size_mb": $(du -sm _build/html | cut -f1),
118- "file_count": $(find _build/html -type f | wc -l)
119- }
120- EOF
121- - name : Upload archives to release
122- uses : softprops/action-gh-release@v2
123- with :
124- files : |
125- lecture-python-programming-html-${{ github.ref_name }}.tar.gz
126- html-checksum.txt
127- html-manifest.json
128- env :
129- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
130- - name : Add CNAME for custom domain
131- run : echo "python-programming.quantecon.org" > _build/html/CNAME
132- - name : Setup Pages
133- uses : actions/configure-pages@v6
134- - name : Upload Pages artifact
135- uses : actions/upload-pages-artifact@v4
136- with :
137- path : _build/html/
104+ # Deploy to GitHub Pages + publish release assets (html archive, checksum, manifest)
138105 - name : Deploy to GitHub Pages
139106 id : deployment
140- uses : actions/deploy-pages@v5
107+ uses : quantecon/actions/publish-gh-pages@v0.9.0
108+ with :
109+ build-dir : _build/html
110+ cname : python-programming.quantecon.org
111+ create-release-assets : ' true'
112+ asset-name : ' lecture-python-programming-html'
113+ github-token : ${{ secrets.GITHUB_TOKEN }}
141114 - name : Prepare lecture-python-programming.notebooks sync
142115 shell : bash -l {0}
143116 run : |
0 commit comments