Redo docs to acomodate factory refactor (#247) #81
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: dev docs | |
on: | |
# run this workflow when dev checks pass | |
push: | |
branches: | |
- master | |
# 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: Update pip | |
run: python -m pip install --upgrade pip | |
- name: Cache for virtual environment | |
uses: actions/cache@v3 | |
with: | |
path: ./.venv | |
key: venv-${{ matrix.os }}-${{ matrix.python-version }}-${{ hashFiles('doc_requirements.txt') }} | |
- name: Install dependencies | |
run: pip install -r doc_requirements.txt | |
- 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 | |
- name: Build and push docs | |
run: | | |
mkdocs gh-deploy --force --remote-branch gh-pages --remote-name origin |