TSMP-PDAF documentation updates (#245) #69
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 of the action | |
name: RenderMasterSphinxDocumentation | |
# Events on which this action should trigger | |
on: | |
push: | |
branches: | |
# run on push event, but if branch is master only | |
- master | |
# List of jobs to do | |
jobs: | |
# Job name | |
makeDoc: | |
# Wich OS / docker image to be used | |
runs-on: ubuntu-latest | |
# Steps of the job | |
steps: | |
# Checkout the master branch | |
- uses: actions/checkout@v3 | |
with: | |
ref: 'master' | |
# Also check out the gh-pages branch (under _build/). | |
# This is a small workaround to avoid completely overwriting the gh-pages | |
# branch and thus killing existing documentation. | |
# Changes will still be rendered, so the documentation will be up to date. | |
- uses: actions/checkout@v3 | |
with: | |
ref: gh-pages | |
path: _build/ | |
# Use python env. and install dependencies | |
- uses: actions/setup-python@v3 | |
- name: Install dependencies | |
run: | | |
pip install --upgrade myst-parser | |
pip install sphinx sphinx_rtd_theme | |
pip install sphinx-copybutton | |
# Build documentation with sphinx in _build | |
- name: Sphinx build | |
run: | | |
sphinx-build -a doc _build | |
# Deploy new rendered documentation by pushing to branch gh-pages | |
# The actual GiHub Page is refreshed by GitHub if the branch | |
# gh-pages is updated automatically. | |
- name: Deploy | |
uses: peaceiris/actions-gh-pages@v3 | |
with: | |
publish_branch: gh-pages | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: _build/ | |
force_orphan: true | |