-
Notifications
You must be signed in to change notification settings - Fork 9
63 lines (54 loc) · 1.66 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
58
59
60
61
62
63
name: Build docs
on:
push:
branches:
- master
- documentation # only for quick updates or testing purposes
pull_request:
jobs:
docs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [ "3.10.13" ]
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: |
python3 -m pip install --upgrade pip
pip3 install -e .["doc"]
- 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
- run: |
cp docs/_build/latex/ontolearn.pdf docs/_build/html/
- name: Deploy to netlify
uses: nwtgck/[email protected]
with:
publish-dir: 'docs/_build/html'
production-branch: develop
github-token: ${{ secrets.GITHUB_TOKEN }}
deploy-message: "Deploy from GitHub Actions ${{ github.sha }}"
alias: ${{ github.head_ref }}
enable-pull-request-comment: false
enable-commit-comment: false
env:
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}
timeout-minutes: 5