Skip to content

Fix missing name in tutorial (#46) #248

Fix missing name in tutorial (#46)

Fix missing name in tutorial (#46) #248

Workflow file for this run

name: Build Docs
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
workflow_dispatch:
inputs:
version:
description: 'Version to build (default: dev)'
default: 'dev'
jobs:
build:
env:
RAT_URL: "https://rascalsoftware.github.io/RAT-Docs/"
RAT_VERSION: "${{ github.event.inputs.version }}"
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 &
VERSION=${RAT_VERSION:-"dev"}
python -m pip install --upgrade pip
if [ ${VERSION} == 'dev' ]; then
wget https://github.com/RascalSoftware/RAT/releases/download/nightly/Linux.zip
pip install RATapi
else
wget "https://github.com/RascalSoftware/RAT/releases/download/${VERSION}/Linux.zip"
pip install RATapi==${VERSION} || pip install RATapi
fi
unzip Linux.zip -d API/
rm API/utilities/mockFunction.m # as otherwise the MATLAB reference fails to parse it
# 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
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 github-actions@github.com
git add -A
git commit -m "Publish Documentation" || true
git push