From 7a39fdf869262629e7ac210dc66253863ce6f0ce Mon Sep 17 00:00:00 2001 From: Gabriel Dugny Date: Fri, 26 Jan 2024 15:54:59 +0100 Subject: [PATCH] ci: fix wrong docs name --- .github/workflows/docs.yml | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index f7300690..f95dbc83 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -70,7 +70,7 @@ jobs: git config user.name "FireFighter Release CI" - name: Deploy docs (dev) - if: github.event_name == 'push' && github.ref == 'refs/heads/main' + if: github.event_name == 'push' && github.ref_name == 'main' && github.ref_type == 'branch' run: | export SHORT_SHA=$(echo "${GITHUB_SHA}" | cut -c1-7) pdm run mike deploy dev --update-aliases --title "dev (${SHORT_SHA})" --push @@ -78,17 +78,18 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: Deploy docs (tag) - if: startsWith(github.ref, 'refs/tags/') && github.event_name == 'push' + if: git.ref_type == 'tag' && github.event_name == 'push' run: | - pdm run mike deploy ${{ github.ref }} latest --push --update-aliases + pdm run mike deploy ${{ github.ref_name }} latest --push --update-aliases pdm run mike set-default latest --push env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: Deploy docs (Released published) - if: github.event_name == 'release' && github.event.action == 'published' && startsWith(github.ref, 'refs/tags/') + if: github.event_name == 'release' && github.event.action == 'published' && git.ref_type == 'tag' run: | - pdm run mike deploy ${{ github.ref }} latest --push --update-aliases + # Version from tag, keep leading v, from github.ref workflow variable + pdm run mike deploy ${{ github.ref_name }} latest --push --update-aliases pdm run mike set-default latest --push env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}