Adding Docs Workflow (#186) #1
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
# This pipeline builds the documentation. | |
name: docs | |
on: | |
push: | |
branches: [ main ] | |
permissions: | |
contents: write | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: "3.9" | |
cache: "pip" | |
- name: Install Poetry | |
uses: snok/install-poetry@v1 | |
with: | |
virtualenvs-create: true | |
virtualenvs-in-project: true | |
version: "1.3.2" | |
- name: Cache dependencies | |
id: cache-deps | |
uses: actions/cache@v2 | |
with: | |
path: .venv | |
key: pydeps-${{ hashFiles('**/poetry.lock') }} | |
- name: Install the dependencies | |
run: poetry install --no-interaction --no-root --with dev | |
if: steps.cache-deps.outputs.cache-hit != 'true' | |
- name: Install the module | |
run: poetry install --with dev --no-interaction | |
- name: Generate the documentation | |
run: poetry run mkdocs gh-deploy --force |