-
Notifications
You must be signed in to change notification settings - Fork 2
54 lines (49 loc) · 1.55 KB
/
build_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
name: Build Docs
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
build:
env:
RAT_URL: "https://rascalsoftware.github.io/RAT-Docs/"
RAT_VERSION: "dev"
runs-on: Linux
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.11'
- name: Build docs
run: |
# create an x11 display because otherwise MATLAB refuses to export live scripts...
sudo apt install -y xvfb
export DISPLAY=':99.0'
Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 &
wget https://github.com/RascalSoftware/RAT/releases/download/nightly/Linux.zip
unzip Linux.zip -d API/
# we get pandoc from web as apt version is outdated
wget https://github.com/jgm/pandoc/releases/download/3.6.2/pandoc-3.6.2-1-amd64.deb
sudo apt install -y ./pandoc-3.6.2-1-amd64.deb
python -m pip install --upgrade pip
pip install matlabengine==24.1.*
pip install -r requirements.txt
python build_docs.py
- name: Checkout gh-pages
if: github.ref == 'refs/heads/main'
uses: actions/checkout@v4
with:
ref: gh-pages
path: _web
- name: Deploy docs locally
if: github.ref == 'refs/heads/main'
run: |
python deploy.py
cd _web
git config user.name github-actions
git config user.email [email protected]
git add -A
git commit -m "Publish Documentation" || true
git push