Update PDM version and install Graphviz for docs #12
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: Docs 📖 | |
on: | |
workflow_dispatch: | |
push: | |
paths: | |
- '.github/workflows/docs.yml' | |
- 'pyproject.toml' | |
- 'docs/**' | |
- 'hockeygameclock/**' | |
jobs: | |
build: | |
name: Build | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Set up Python 3.10 and PDM 2.10.0 | |
uses: pdm-project/setup-pdm@v3 | |
with: | |
python-version: '3.10' | |
architecture: x64 | |
version: 2.10.0 | |
- name: Install hockeygameclock and development tools | |
run: pdm install -dG doc | |
- name: Install Graphviz (needed by PlantUML) | |
run: apt-get install graphviz | |
- name: Run Sphinx | |
run: | | |
cd docs | |
pdm run make html | |
cd .. | |
- name: Create and upload GitHub Pages artifact | |
uses: actions/upload-pages-artifact@v1 | |
with: | |
path: docs/_build/html | |
deploy: | |
needs: build | |
permissions: | |
pages: write | |
id-token: write | |
environment: | |
name: github-pages | |
url: ${{ steps.deployment.outputs.page_url }} | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Deploy to GitHub Pages | |
id: deployment | |
uses: actions/deploy-pages@v2 |