Skip to content

Merge pull request #156 from RafaelWO/dependabot/pip/mkdocstrings-pyt… #71

Merge pull request #156 from RafaelWO/dependabot/pip/mkdocstrings-pyt…

Merge pull request #156 from RafaelWO/dependabot/pip/mkdocstrings-pyt… #71

Workflow file for this run

name: Docs
on:
push:
branches:
- main
tags:
- '**'
permissions:
contents: write
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout gh-pages
uses: actions/checkout@v4
with:
ref: gh-pages
- name: Checkout current branch
uses: actions/checkout@v4
- name: Configure Git Credentials
run: |
git config user.name github-actions[bot]
git config user.email 41898282+github-actions[bot]@users.noreply.github.com
- uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Install and configure Poetry
uses: snok/install-poetry@v1
with:
virtualenvs-create: true
virtualenvs-in-project: true
installer-parallel: true
- name: Install dependencies
run: |
poetry install --only docs
- name: Publish docs on push to main (dev)
if: github.ref == 'refs/heads/main'
run: poetry run mike deploy dev --push
- name: Get package version
if: startsWith(github.ref, 'refs/tags/')
id: check-version
run: |
echo "VERSION=$(grep 'current_version =' .bumpversion.cfg | awk -F' = ' '{print $2}' | awk -F. '{print $1 "." $2}')" >> $GITHUB_OUTPUT
- name: Publish docs on push of tags (latest)
if: startsWith(github.ref, 'refs/tags/')
run: poetry run mike deploy ${{ steps.check-version.outputs.VERSION }} latest --update-aliases --push