Update sphinx.yml #181
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Sphinx documentation build | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install Python 3 | |
uses: actions/setup-python@v5 | |
with: | |
python-version: '3.9.x' | |
- name: Install pandoc and LaTeX dependencies | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y pandoc | |
sudo apt-get install -y texlive-latex-recommended texlive-latex-extra dvipng texlive-fonts-recommended | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install build | |
pip install .[docs,test] | |
- name: Build package | |
run: python -m build | |
- name: Build HTML | |
run: | | |
cd docs | |
make html | |
- name: Upload artifacts | |
uses: actions/upload-artifact@v1 | |
with: | |
name: html-docs | |
path: docs/_build/html/ | |
- name: Deploy | |
uses: peaceiris/actions-gh-pages@v4 | |
if: github.ref == 'refs/heads/main' | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: docs/_build/html |