Skip to content

Commit

Permalink
CI: Build the documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
HaoZeke committed Feb 2, 2024
1 parent 60f63c4 commit adb2625
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 2 deletions.
8 changes: 8 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,8 @@ jobs:
shell: bash
run: |
source bin/test_symengine_unix.sh
pip install sphinx m2r2 sphinxcontrib-apidoc sphinx-book-theme
sphinx-build docs/ genDocs
env:
PYTEST_ADDOPTS: ${{ matrix.PYTEST_ADDOPTS }}
USE_GLIBCXX_DEBUG: ${{ matrix.USE_GLIBCXX_DEBUG }}
Expand Down Expand Up @@ -185,6 +187,12 @@ jobs:
BUILD_SHARED_LIBS: ${{ matrix.BUILD_SHARED_LIBS }}
PYTHON_VERSION: ${{ matrix.PYTHON_VERSION }}

- name: Generate documentation
shell: bash
run: |
pip install sphinx m2r2 sphinx-autodoc2 sphinx-book-theme
sphinx-build docs/ genDocs
- name: Deploy Documentation
if: ${{ (github.ref == 'refs/heads/main' && github.repository == 'Symengine/symengine.py') || (github.ref == 'refs/heads/master' && github.repository == 'Symengine/symengine.py')}}
uses: peaceiris/actions-gh-pages@v3
Expand Down
1 change: 0 additions & 1 deletion bin/test_symengine_unix.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,3 @@ source bin/install_travis.sh
# Build Python wrappers and test
cd $PYTHON_SOURCE_DIR
bin/test_travis.sh

5 changes: 5 additions & 0 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,11 @@
"sphinxcontrib.apidoc", # Automatically sets up sphinx-apidoc
# "recommonmark", # Parses markdown
"m2r2", # Parses markdown in rst
"autodoc2",
]

autodoc2_packages = [
"../symengine",
]

# Add any paths that contain templates here, relative to this directory.
Expand Down
2 changes: 1 addition & 1 deletion docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Symengine Python API Documentation
:maxdepth: 2
:caption: Contents:

source/modules
apidocs/index

.. mdinclude:: ../README.md

Expand Down

0 comments on commit adb2625

Please sign in to comment.