Skip to content

Commit 09ed763

Browse files
fix: avoid installing sphinx-autoapi branch in pyproject.toml (#21)
Co-authored-by: Revathyvenugopal162 <[email protected]>
1 parent 0c72f62 commit 09ed763

File tree

2 files changed

+49
-2
lines changed

2 files changed

+49
-2
lines changed

.github/workflows/ci.yml

Lines changed: 46 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,10 +43,55 @@ jobs:
4343
runs-on: ubuntu-latest
4444
needs: [doc-style]
4545
steps:
46-
- uses: ansys/actions/doc-build@v4
46+
47+
- name: "Checkout project"
48+
uses: actions/checkout@v4
49+
50+
- name: "Install Python"
51+
uses: actions/setup-python@v4
4752
with:
4853
python-version: ${{ env.MAIN_PYTHON_VERSION }}
4954

55+
- name: "Install project with doc dependencies"
56+
run: |
57+
sudo apt update
58+
sudo apt-get install -y build-essential texlive-latex-extra latexmk texlive-pstricks
59+
python -m pip install .[doc]
60+
61+
- name: "Install custom sphinx-autoapi branch"
62+
run: |
63+
python -m pip install \
64+
"sphinx-autoapi @ git+https://github.com/ansys/sphinx-autoapi@feat/single-page-stable"
65+
66+
- name: "Build HTML documentation"
67+
run: |
68+
make -C doc html
69+
70+
- name: "Build PDF documentation"
71+
run: |
72+
make -C doc pdf
73+
74+
- name: "Upload HTML documentation artifact"
75+
uses: actions/upload-artifact@v3
76+
with:
77+
name: documentation-html
78+
path: doc/_build/html
79+
retention-days: 7
80+
81+
- name: "Upload PDF documentation artifact"
82+
uses: actions/upload-artifact@v3
83+
with:
84+
name: documentation-pdf
85+
path: doc/_build/latex/*.pdf
86+
retention-days: 7
87+
88+
# TODO: restore these step in favor of previous ones this PR is merged
89+
# https://github.com/readthedocs/sphinx-autoapi/pull/399
90+
#
91+
# - uses: ansys/actions/doc-build@v4
92+
# with:
93+
# python-version: ${{ env.MAIN_PYTHON_VERSION }}
94+
5095
build-wheelhouse:
5196
name: "Build wheelhouse for latest Python versions"
5297
runs-on: ${{ matrix.os }}

pyproject.toml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,9 @@ doc = [
4141
"myst-parser==2.0.0",
4242
"numpydoc==1.5.0",
4343
"Sphinx==7.2.5",
44-
"sphinx-autoapi @ git+https://github.com/ansys/sphinx-autoapi@feat/single-page-stable",
44+
# TODO: use the following for local development until merged into sphinx-autoapi
45+
# "sphinx-autoapi @ git+https://github.com/ansys/sphinx-autoapi@feat/single-page-stable",
46+
"sphinx-autoapi==3.0.0",
4547
"sphinx-autodoc-typehints==1.24.0",
4648
"sphinx-copybutton==0.5.2",
4749
"sphinx_design==0.5.0",

0 commit comments

Comments
 (0)