-
Notifications
You must be signed in to change notification settings - Fork 9
69 lines (57 loc) · 1.87 KB
/
nightly-build.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
64
65
66
67
68
69
name: Nightly Documentation Build
on:
schedule: # UTC at 0400
- cron: '0 4 * * */2' # To run every 3 days
workflow_dispatch:
env:
MAIN_PYTHON_VERSION: '3.13'
jobs:
nightly-docs:
name: Nightly documentation
runs-on: ubuntu-latest
steps:
- name: Setup headless display
uses: pyvista/setup-headless-display-action@v3
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ env.MAIN_PYTHON_VERSION }}
- name: Install system dependencies
run: |
sudo apt-get update
sudo apt-get install -y texlive-latex-extra latexmk nodejs npm graphviz
npm install -g @mermaid-js/mermaid-cli
- name: Install Python dependencies
run: |
python -m pip install --upgrade pip tox
- name: Build HTML documentation
run: |
tox -e doc
- name: Build PDF Documentation
run: |
sudo apt update
sudo apt-get install -y texlive-latex-extra latexmk
python -m pip install -r requirements/requirements_doc.txt
make -C doc pdf
- name: Upload HTML documentation
uses: actions/[email protected]
with:
name: HTML-Documentation
path: doc/_build/html
retention-days: 7
- name: Upload PDF Documentation
uses: actions/[email protected]
with:
name: PDF-Documentation
path: doc/_build/latex/pyansys*.pdf
retention-days: 7
- name: Deploy to gh-pages
if: github.event_name == 'push' && contains(github.ref, 'refs/tags')
uses: JamesIves/[email protected]
with:
token: ${{ secrets.GITHUB_TOKEN }}
branch: gh-pages
folder: .tox/doc_out_html/
clean: true
single-commit: true