@@ -3,70 +3,12 @@ permissions:
33 contents : read
44on :
55 pull_request :
6- workflow_run :
7- workflows : ["Test"]
8- types : [completed]
6+ push :
97 branches :
108 - main
11- merge_group :
129 workflow_dispatch :
10+ merge_group :
1311jobs :
14- get-python-versions :
15- uses : ./.github/workflows/get-python-versions.yml
16- build-docs :
17- needs : get-python-versions
18- runs-on : ubuntu-latest
19- name : Build HTML docs
20- strategy :
21- fail-fast : false
22- matrix :
23- python-version : ${{ fromJson(needs.get-python-versions.outputs.python-versions) }}
24- steps :
25- - uses : actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
26- with :
27- lfs : true
28- - name : Install uv
29- uses : astral-sh/setup-uv@cec208311dfd045dd5311c1add060b2062131d57 # v7.0.0
30- with :
31- python-version : ${{ matrix.python-version }}
32- - name : Install just
33- uses : extractions/setup-just@53165ef7e734c5c07cb06b3c8e7b647c5aa16db3 # v3.0.0
34- - name : Install Computer Modern Unicode fonts
35- run : sudo apt-get install -y fonts-cmu
36- - run : uv sync --all-extras --no-extra gdsfactoryplus
37- - run : just docs
38- - uses : actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
39- with :
40- name : html-docs-${{ matrix.python-version }}
41- path : " ./docs/_build/html/"
42- build-docs-result :
43- runs-on : ubuntu-latest
44- name : Build docs result
45- needs : build-docs
46- if : always()
47- steps :
48- - name : Check build-docs matrix results
49- run : |
50- if [[ "${{ needs.build-docs.result }}" == "success" ]]; then
51- echo "All build-docs jobs succeeded"
52- exit 0
53- else
54- echo "One or more build-docs jobs failed"
55- exit 1
56- fi
57- get-latest-python :
58- needs : get-python-versions
59- runs-on : ubuntu-latest
60- outputs :
61- latest-python : ${{ steps.get-latest.outputs.latest-python }}
62- steps :
63- - name : Get latest Python version
64- id : get-latest
65- run : |
66- versions='${{ needs.get-python-versions.outputs.python-versions }}'
67- latest=$(echo "$versions" | jq -r '.[-1]')
68- echo "latest-python=$latest" >> "$GITHUB_OUTPUT"
69- echo "Latest Python version: $latest"
7012 build-docs-pdf :
7113 runs-on : ubuntu-latest
7214 name : Build PDF docs
@@ -113,40 +55,13 @@ jobs:
11355 with :
11456 name : pdf-docs
11557 path : " ./docs/_build/latex/qpdk.pdf"
116- deploy-docs :
117- runs-on : ubuntu-latest
118- name : Deploy to GitHub Pages
119- needs : [build-docs, build-docs-pdf, get-latest-python]
120- if : >
121- (github.event_name == 'workflow_run' && github.event.workflow_run.conclusion == 'success') || (github.event_name == 'workflow_dispatch' && github.ref == 'refs/heads/main')
122-
58+ pages :
59+ needs : build-docs-pdf
12360 permissions :
61+ actions : read
12462 pages : write
12563 id-token : write
126- environment :
127- name : github-pages
128- url : ${{ steps.deployment.outputs.page_url }}
129- steps :
130- - name : Download HTML artifact (latest Python)
131- uses : actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.0
132- with :
133- name : html-docs-${{ needs.get-latest-python.outputs.latest-python }}
134- path : _site
135- - name : Download PDF artifact
136- uses : actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.0
137- with :
138- name : pdf-docs
139- path : _site
140- - name : Download coverage report
141- uses : actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.0
142- continue-on-error : true
143- with :
144- name : coverage-report-${{ needs.get-latest-python.outputs.latest-python }}
145- path : _site/reports/coverage
146- run-id : ${{ github.event.workflow_run.id || github.run_id }}
147- github-token : ${{ secrets.GITHUB_TOKEN }}
148- - name : Upload merged pages artifact
149- uses : actions/upload-pages-artifact@7b1f4a764d45c48632c6b24a0339c27f5614fb0b # v4.0.0
150- - name : Deploy to GitHub Pages
151- id : deployment
152- uses : actions/deploy-pages@cd2ce8fcbc39b97be8ca5fce6e763baed58fa128 # v5.0.0
64+ uses : doplaydo/pdk-ci-workflow/.github/workflows/pages.yml@main # zizmor: ignore[unpinned-uses, secrets-inherit]
65+ secrets :
66+ GFP_API_KEY : ${{ secrets.GFP_API_KEY }}
67+ SIMCLOUD_APIKEY : ${{ secrets.SIMCLOUD_APIKEY }}
0 commit comments