Merge pull request #148 from nlesc-recruit/145-psconfig-sensorpair #79
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: documentation | |
on: | |
workflow_dispatch: | |
push: | |
tags: | |
- '*' | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install sphinx and related dependencies | |
run: sudo apt install -y doxygen && pip install -r docs/requirements.txt | |
- name: Build documentation | |
# run build twice to fix crossrefs | |
run: make -C docs html && make -C docs html | |
- uses: actions/upload-artifact@v3 | |
with: | |
path: docs/_build/html/* | |
deploy: | |
runs-on: ubuntu-latest | |
needs: build | |
# deploy tags | |
if: startsWith(github.ref, 'refs/tags') | |
steps: | |
- uses: actions/download-artifact@v3 | |
with: | |
name: artifact | |
path: docs/_build/html | |
- uses: peaceiris/actions-gh-pages@v3 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: docs/_build/html | |