Update docs #127
Workflow file for this run
This file contains hidden or 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: docs | |
on: | |
push: | |
branches: | |
- main | |
- final_project | |
pull_request: | |
branches: | |
- main | |
- final_project | |
jobs: | |
docs: | |
name: Documentation | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Clean previous builds | |
run: rm -rf build dist *.egg-info | |
- name: Install system dependencies | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y python3.12 python3.12-venv python3-pip git | |
- name: Install MPI (OpenMPI) | |
run: sudo apt-get update && sudo apt-get install -y libopenmpi-dev openmpi-bin | |
- name: Create virtual environment and install package | |
run: | | |
python3.12 -m venv venv | |
source venv/bin/activate | |
python3.12 -m pip install --upgrade pip | |
python3.12 -m pip install --no-cache-dir . | |
shell: bash -e {0} | |
- name: Generate documentation | |
run: | | |
source venv/bin/activate | |
cd docs | |
make html | |
shell: bash -e {0} | |
- name: Deploy | |
if: success() | |
uses: peaceiris/actions-gh-pages@v3 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: docs/_build/html | |
allow_empty_commit: true |