From 05a9ea9334f8bceb9996db09f3e73e8ca52de2b9 Mon Sep 17 00:00:00 2001 From: Janis Fix Date: Mon, 11 Sep 2023 12:37:34 +0200 Subject: [PATCH] Add doc versioning via mike --- .github/workflows/docs.yml | 8 +++++++- mkdocs.yml | 6 +++++- pyproject.toml | 1 + 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index f9ac450..0b0b161 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -27,5 +27,11 @@ jobs: with: key: ${{ github.ref }} path: .cache + - uses: SebRollen/toml-action@v1.0.2 + id: read_toml + with: + file: 'pyproject.toml' + field: 'project.version' - run: pip install ".[dev]" - - run: mkdocs gh-deploy --force \ No newline at end of file + - run: mike deploy --push --update-aliases ${{ steps.read_toml.outputs.value }} latest + - run: mike set-default --push latest \ No newline at end of file diff --git a/mkdocs.yml b/mkdocs.yml index e9ed3a5..b303b92 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -100,4 +100,8 @@ plugins: members_order: "source" show_signature: true separate_signature: false - show_signature_annotations: false \ No newline at end of file + show_signature_annotations: false + +extra: + version: + provider: mike \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 8aeaa3e..dd3a1a4 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -46,6 +46,7 @@ dev = [ "mkdocs-material", "mkdocstrings[python]", "markdown-exec[ansi]", + "mike", # Others "ruff", "black",