-
Notifications
You must be signed in to change notification settings - Fork 9
56 lines (53 loc) · 1.6 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
name: Build docs
on:
push:
branches:
- master
- develop
pull_request:
jobs:
docs:
runs-on: ubuntu-latest
strategy:
max-parallel: 5
steps:
- uses: actions/checkout@v3
- name: Install tox
id: install-tox
run: |
pip install tox
echo "tox_version=$(pip list | grep tox | tr -d ' ')" >> $GITHUB_OUTPUT
- name: prepare required software
run: |
# epstopdf & dot & noto-fonts
sudo apt update && sudo apt install texlive-font-utils graphviz fonts-noto
- uses: actions/cache@v3
with:
key: ${{ runner.os }}-${{ steps.install-tox.outputs.tox_version }}-docs-${{ hashFiles('environment.yml', 'tox.ini') }}
path: .tox
- name: Build docs with tox
run: |
tox -o -e docs
- name: Build latex docs with tox
run: |
tox -o -e docs -- latex
- 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