Merge pull request #286 from dice-group/refactor #754
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: Build docs | |
on: | |
push: | |
branches: | |
- main | |
- develop | |
- documentation # just for testing | |
pull_request: | |
jobs: | |
docs: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: [ "3.10.11" ] | |
max-parallel: 5 | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install -r requirements.txt | |
- name: Prepare required software | |
run: | | |
# epstopdf & dot & noto-fonts | |
sudo apt update && sudo apt install texlive-font-utils graphviz fonts-noto\ | |
- name: Build docs | |
run: | | |
sphinx-build -M html docs/ docs/_build/ | |
- name: Build LaTeX docs | |
run: | | |
sphinx-build -M latex docs/ docs/_build/ | |
- name: Compile LaTeX document | |
uses: docker://texlive/texlive:latest | |
with: | |
args: make -C docs/_build/latex | |
- name: Copy Latex pdf to ./html | |
run: | | |
cp docs/_build/latex/diceembeddings.pdf docs/_build/html/ | |
- name: Deploy to GitHub Pages | |
uses: peaceiris/actions-gh-pages@v3 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: 'docs/_build/html' |