Skip to content

Commit 1c32d5c

Browse files
committed
Add second part of deployment for metadata
1 parent 21bd387 commit 1c32d5c

File tree

1 file changed

+24
-2
lines changed

1 file changed

+24
-2
lines changed

.github/workflows/update.yml

+24-2
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
- uses: actions/checkout@v4
2121
- run: sudo apt-get install -y gettext
2222
- 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
2424
- name: Deploy 🚀
2525
if: github.event_name != 'pull_request'
2626
uses: JamesIves/github-pages-deploy-action@v4
@@ -51,9 +51,31 @@ jobs:
5151
- name: Debug index.html if pull request
5252
if: github.event_name == 'pull_request'
5353
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
5555
diff --color=always -u index.html-public index.html || :
5656
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
5779
- uses: actions/upload-artifact@v4
5880
with:
5981
name: build

0 commit comments

Comments
 (0)