Deploy Documentation #648
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: Deploy Documentation | |
on: | |
workflow_dispatch: | |
pull_request: | |
branches: | |
- release | |
jobs: | |
deploy-docs: | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
shell: bash -l {0} | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.10' | |
- name: Cache pip | |
uses: actions/cache@v3 | |
with: | |
# This path is specific to Ubuntu | |
path: ~/.cache/pip | |
# Look to see if there is a cache hit for the corresponding requirements file | |
key: ${{ runner.os }}-pip-${{ hashFiles('setup.py') }} | |
restore-keys: | | |
${{ runner.os }}-pip- | |
${{ runner.os }}- | |
- name: Install dependencies | |
run: | | |
pip install -r requirements.txt | |
pip install -r requirements/docs.txt | |
pip install pypardiso | |
- name: Build the documentation | |
run: | | |
cd docs | |
make html | |
- name: GitHub Pages action | |
uses: peaceiris/actions-gh-pages@v3 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: ./docs/_build/html | |
cname: openpnm.org |