-
Notifications
You must be signed in to change notification settings - Fork 2
57 lines (48 loc) · 1.45 KB
/
docs.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
name: Build & Publish 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 -e .
pip install sphinx sphinx_rtd_theme sphinx-autoapi sphinx-theme sphinxcontrib-plantuml plantuml-local-client myst-parser
- 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/owlapy.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'