|
20 | 20 | - uses: actions/checkout@v4
|
21 | 21 | - run: sudo apt-get install -y gettext
|
22 | 22 | - run: uv run generate.py # generates "index.html"
|
23 |
| - - run: mkdir -p build && cp index.* style.css warnings* build |
| 23 | + - run: mkdir -p build && cp index.* style.css build |
24 | 24 | - name: Deploy 🚀
|
25 | 25 | if: github.event_name != 'pull_request'
|
26 | 26 | uses: JamesIves/github-pages-deploy-action@v4
|
|
51 | 51 | - name: Debug index.html if pull request
|
52 | 52 | if: github.event_name == 'pull_request'
|
53 | 53 | run: |
|
54 |
| - curl -Lo index.html-public https://github.com/m-aciek/pydocs-translation-dashboard/raw/refs/heads/gh-pages/index.html |
| 54 | + curl -Lo index.html-public https://github.com/python-docs-translations/dashboard/raw/refs/heads/gh-pages/index.html |
55 | 55 | diff --color=always -u index.html-public index.html || :
|
56 | 56 | cat index.html
|
| 57 | + - if: github.event_name == 'pull_request' |
| 58 | + run: uv run generate_metadata.py https://${{ github.repository_owner }}.github.io/${{ github.event.repository.name }}/index.json # generates "metadata.html" |
| 59 | + - if: github.event_name != 'pull_request' |
| 60 | + run: uv run generate_metadata.py https://${{ github.repository_owner }}.github.io/${{ github.event.repository.name }}/${{ github.ref_name }}/index.json # generates "metadata.html" |
| 61 | + - run: cp metadata.html warnings* build |
| 62 | + - name: Deploy metadata view 🚀 |
| 63 | + if: github.event_name != 'pull_request' |
| 64 | + uses: JamesIves/github-pages-deploy-action@v4 |
| 65 | + with: |
| 66 | + folder: build |
| 67 | + clean: false |
| 68 | + git-config-name: github-actions[bot] |
| 69 | + git-config-email: 41898282+github-actions[bot]@users.noreply.github.com |
| 70 | + - name: Deploy metadata view to subdirectory if pull request 🚀 |
| 71 | + if: github.event_name == 'pull_request' |
| 72 | + uses: JamesIves/github-pages-deploy-action@v4 |
| 73 | + with: |
| 74 | + folder: build |
| 75 | + target-folder: ${{ github.ref_name }} |
| 76 | + clean: false |
| 77 | + git-config-name: github-actions[bot] |
| 78 | + git-config-email: 41898282+github-actions[bot]@users.noreply.github.com |
57 | 79 | - uses: actions/upload-artifact@v4
|
58 | 80 | with:
|
59 | 81 | name: build
|
|
0 commit comments