Skip to content

Commit 977356d

Browse files
committed
[CI] add docs step
1 parent b86eb38 commit 977356d

File tree

1 file changed

+44
-0
lines changed

1 file changed

+44
-0
lines changed

.github/workflows/wheel.yml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,38 @@ jobs:
8787
- name: Test
8888
run: pytest -rP
8989

90+
docs:
91+
runs-on: ubuntu-latest
92+
needs: [build-sdist]
93+
steps:
94+
- uses: actions/checkout@v4
95+
- uses: actions/setup-python@v5
96+
with:
97+
python-version: '3.12'
98+
- name: Download wheels
99+
uses: actions/download-artifact@v4
100+
with:
101+
name: native-wheels
102+
path: dist
103+
- name: Install ${PACKAGE_NAME}
104+
run: python3 -m pip install --find-links=dist "${PACKAGE_NAME}[docs]==${PACKAGE_VERSION}"
105+
- name: Install Doxygen
106+
run: >
107+
wget -qO- https://github.com/doxygen/doxygen/releases/download/Release_1_15_0/doxygen-1.15.0.linux.bin.tar.gz
108+
| tar xz -C /usr/local/bin doxygen-1.15.0/bin/doxygen --strip-components=2
109+
- name: Setup Pages
110+
id: pages
111+
uses: actions/configure-pages@v5
112+
- name: Doxygen build
113+
run: doxygen scripts/docs/Doxyfile
114+
- name: Sphinx build
115+
run: make -C scripts/docs html
116+
- name: Upload artifact
117+
id: deployment
118+
uses: actions/upload-pages-artifact@v4
119+
with:
120+
path: ./scripts/docs/build/html
121+
90122
# After the native build, we have the stub files, and we can start cross-
91123
# compiling for all architectures.
92124
build-linux:
@@ -297,3 +329,15 @@ jobs:
297329
uses: pypa/gh-action-pypi-publish@ed0c53931b1dc9bd32cbe73a98c7f6766f8a527e
298330
# with:
299331
# repository-url: https://test.pypi.org/legacy/
332+
333+
deploy-docs:
334+
environment:
335+
name: github-pages
336+
url: ${{ steps.deployment.outputs.page_url }}
337+
runs-on: ubuntu-latest
338+
needs: [docs, check-release, test-linux-x]
339+
if: ${{ github.event.action == 'released' || github.event.action == 'prereleased' }}
340+
steps:
341+
- name: Deploy to GitHub Pages
342+
id: deployment
343+
uses: actions/deploy-pages@v4

0 commit comments

Comments
 (0)