|
3 | 3 | push: |
4 | 4 | tags: |
5 | 5 | - 'publish*' |
| 6 | + |
| 7 | +permissions: |
| 8 | + contents: write |
| 9 | + actions: read |
| 10 | + pages: write |
| 11 | + id-token: write |
| 12 | + |
| 13 | +concurrency: |
| 14 | + group: "pages" |
| 15 | + cancel-in-progress: false |
| 16 | + |
6 | 17 | jobs: |
7 | 18 | publish: |
8 | 19 | if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags') |
9 | 20 | runs-on: "runs-on=${{ github.run_id }}/family=g4dn.2xlarge/image=quantecon_ubuntu2404/disk=large" |
| 21 | + environment: |
| 22 | + name: github-pages |
| 23 | + url: ${{ steps.deployment.outputs.page_url }} |
10 | 24 | steps: |
11 | 25 | - name: Checkout |
12 | 26 | uses: actions/checkout@v6 |
|
52 | 66 | run: pip list |
53 | 67 | # Download Build Cache from cache.yml |
54 | 68 | - name: Download "build" folder (cache) |
55 | | - uses: dawidd6/action-download-artifact@v12 |
| 69 | + uses: dawidd6/action-download-artifact@v20 |
56 | 70 | with: |
57 | 71 | workflow: cache.yml |
58 | 72 | branch: main |
|
73 | 87 | run: | |
74 | 88 | jb build lectures --path-output ./ --builder=custom --custom-builder=jupyter -n -W --keep-going |
75 | 89 | zip -r download-notebooks.zip _build/jupyter |
76 | | - - uses: actions/upload-artifact@v6 |
| 90 | + - uses: actions/upload-artifact@v7 |
77 | 91 | with: |
78 | 92 | name: download-notebooks |
79 | 93 | path: download-notebooks.zip |
@@ -113,12 +127,17 @@ jobs: |
113 | 127 | html-manifest.json |
114 | 128 | env: |
115 | 129 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
116 | | - - name: Deploy website to gh-pages |
117 | | - uses: peaceiris/actions-gh-pages@v4 |
| 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 |
118 | 136 | with: |
119 | | - github_token: ${{ secrets.GITHUB_TOKEN }} |
120 | | - publish_dir: _build/html/ |
121 | | - cname: python-programming.quantecon.org |
| 137 | + path: _build/html/ |
| 138 | + - name: Deploy to GitHub Pages |
| 139 | + id: deployment |
| 140 | + uses: actions/deploy-pages@v5 |
122 | 141 | - name: Prepare lecture-python-programming.notebooks sync |
123 | 142 | shell: bash -l {0} |
124 | 143 | run: | |
|
0 commit comments