use poetry for packaging #770
Workflow file for this run
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: Build and Deploy | |
on: | |
release: | |
types: [published] | |
pull_request: | |
types: [opened, synchronize, reopened] | |
permissions: | |
contents: write | |
jobs: | |
build-and-deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout 🛎️ | |
uses: actions/checkout@v4 | |
- name: Set up Python 3.12 | |
uses: actions/setup-python@v5 | |
with: | |
python-version: '3.12' | |
- name: Build | |
run: | | |
sudo apt-get install graphviz | |
pip install poetry poetry-dynamic-versioning | |
poetry install --with dev | |
sphinx-build -j 4 -T -b html docs/source docs/build/html | |
- name: Deploy Stable 🚀 | |
if: github.event_name == 'release' | |
uses: JamesIves/github-pages-deploy-action@v4 | |
with: | |
folder: docs/build/html | |
branch: gh-pages | |
- name: Deploy Dev 🚀 | |
if: (github.event_name == 'pull_request') || (github.event_name == 'push') | |
uses: JamesIves/github-pages-deploy-action@v4 | |
with: | |
folder: docs/build/html | |
branch: gh-pages | |
target-folder: dev |