Skip to content

dev docs

dev docs #47

Workflow file for this run

name: Dev docs
on:
# run this workflow when dev checks pass
workflow_run:
workflows: ["Dev checks"]
types:
- completed
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
# This workflow contains a single job called "docs"
docs:
name: Build and deploy (dev) docs
strategy:
matrix:
os: [ubuntu-latest]
python-version: ["3.11"]
runs-on: ${{ matrix.os }}
steps:
- name: Get repo
uses: actions/checkout@v4
- name: Get gh-pages branch
run: git fetch origin gh-pages --depth=1
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install Poetry
uses: abatilo/actions-poetry@v2
- name: Setup a local virtual environment # for caching purposes
run: |
poetry config virtualenvs.create true --local
poetry config virtualenvs.in-project true --local
- name: Cache for virtual environment
uses: actions/cache@v3
with:
path: ./.venv
key: venv-${{ matrix.os }}-${{ matrix.python-version }}-${{ hashFiles('poetry.lock') }}
- name: Install dependencies
run: poetry install --with dev
- name: Configure git for github-actions[bot]
run: |
git config --global user.name "github-actions[bot]"
git config --global user.email "github-actions[bot]@users.noreply.github.com"
- name: Build and push versioned docs with mike
run: |
poetry run mike deploy --push --update-aliases dev
poetry run mike set-default stable --push