Skip to content

Commit adb2625

Browse files
committed
CI: Build the documentation
1 parent 60f63c4 commit adb2625

File tree

4 files changed

+14
-2
lines changed

4 files changed

+14
-2
lines changed

.github/workflows/ci.yml

+8
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,8 @@ jobs:
151151
shell: bash
152152
run: |
153153
source bin/test_symengine_unix.sh
154+
pip install sphinx m2r2 sphinxcontrib-apidoc sphinx-book-theme
155+
sphinx-build docs/ genDocs
154156
env:
155157
PYTEST_ADDOPTS: ${{ matrix.PYTEST_ADDOPTS }}
156158
USE_GLIBCXX_DEBUG: ${{ matrix.USE_GLIBCXX_DEBUG }}
@@ -185,6 +187,12 @@ jobs:
185187
BUILD_SHARED_LIBS: ${{ matrix.BUILD_SHARED_LIBS }}
186188
PYTHON_VERSION: ${{ matrix.PYTHON_VERSION }}
187189

190+
- name: Generate documentation
191+
shell: bash
192+
run: |
193+
pip install sphinx m2r2 sphinx-autodoc2 sphinx-book-theme
194+
sphinx-build docs/ genDocs
195+
188196
- name: Deploy Documentation
189197
if: ${{ (github.ref == 'refs/heads/main' && github.repository == 'Symengine/symengine.py') || (github.ref == 'refs/heads/master' && github.repository == 'Symengine/symengine.py')}}
190198
uses: peaceiris/actions-gh-pages@v3

bin/test_symengine_unix.sh

-1
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,3 @@ source bin/install_travis.sh
1919
# Build Python wrappers and test
2020
cd $PYTHON_SOURCE_DIR
2121
bin/test_travis.sh
22-

docs/conf.py

+5
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,11 @@
4949
"sphinxcontrib.apidoc", # Automatically sets up sphinx-apidoc
5050
# "recommonmark", # Parses markdown
5151
"m2r2", # Parses markdown in rst
52+
"autodoc2",
53+
]
54+
55+
autodoc2_packages = [
56+
"../symengine",
5257
]
5358

5459
# Add any paths that contain templates here, relative to this directory.

docs/index.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Symengine Python API Documentation
1010
:maxdepth: 2
1111
:caption: Contents:
1212

13-
source/modules
13+
apidocs/index
1414

1515
.. mdinclude:: ../README.md
1616

0 commit comments

Comments
 (0)