From 5f60aef9040f21b51cac95c14522d507ff760ff5 Mon Sep 17 00:00:00 2001 From: Basile Dura Date: Fri, 19 Apr 2024 14:10:38 +0200 Subject: [PATCH] ci: build documentation on release --- .github/workflows/release.yml | 25 +++++++++++++++++++++++++ mkdocs.yml | 4 ++++ 2 files changed, 29 insertions(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 4ad6a87..9f00b0c 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -35,3 +35,28 @@ jobs: - name: Publish package distributions to PyPI uses: pypa/gh-action-pypi-publish@release/v1 + + documentation: + name: Build documentation + + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-python@v5 + with: + python-version: "3.12" + + - name: Install poetry + run: | + pip install poetry + poetry install --only docs + + - name: Set up Git + run: | + git config user.name ${{ github.actor }} + git config user.email ${{ github.actor }}@users.noreply.github.com + + - name: Build documentation + run: | + git fetch origin gh-pages + poetry run mike deploy --push --update-aliases $GITHUB_REF_NAME latest diff --git a/mkdocs.yml b/mkdocs.yml index e87fe6d..d8b20b2 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -50,3 +50,7 @@ plugins: hooks: - docs/scripts/plugin.py + +extra: + version: + provider: mike