From a8fb4365cf6b15f1dfe84228cb2cb3a8f30f3e38 Mon Sep 17 00:00:00 2001 From: Christoph Haas Date: Tue, 13 May 2025 19:34:19 +0200 Subject: [PATCH] Separate tag-based and branch-based documentation deployment Updated the workflow to deploy documentation with `latest` alias only on tagged refs, while regular deployments occur for branches without updating aliases. This ensures proper versioning and prevents unintended alias updates. --- .github/workflows/pages.yml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/.github/workflows/pages.yml b/.github/workflows/pages.yml index cbec92b..efdeefa 100644 --- a/.github/workflows/pages.yml +++ b/.github/workflows/pages.yml @@ -27,7 +27,14 @@ jobs: run: pip install mike mkdocs-material[imaging] mkdocs-minify-plugin mkdocs-swagger-ui-tag - name: Publish documentation - run: mike deploy --push --update-aliases ${{ github.ref_name }} latest + if: ${{ ! startsWith(github.ref, 'refs/tags/') }} + run: mike deploy --push env: GIT_COMMITTER_NAME: "github-actions[bot]" GIT_COMMITTER_EMAIL: "41898282+github-actions[bot]@users.noreply.github.com" + - name: Publish latest documentation + if: ${{ startsWith(github.ref, 'refs/tags/') }} + run: mike deploy --push --update-aliases ${{ github.ref_name }} latest + env: + GIT_COMMITTER_NAME: "github-actions[bot]" + GIT_COMMITTER_EMAIL: "41898282+github-actions[bot]@users.noreply.github.com" \ No newline at end of file