Adds Jupyter notebooks and MATLAB live scripts to the examples #198
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |