From b98ab0bf6646a0dde1b5664b2276e301312aeb1f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Voron?= Date: Wed, 4 May 2022 10:33:20 +0200 Subject: [PATCH] Fix doc CI --- .github/workflows/documentation.yml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/.github/workflows/documentation.yml b/.github/workflows/documentation.yml index 9dbcc2b8..84bcae7e 100644 --- a/.github/workflows/documentation.yml +++ b/.github/workflows/documentation.yml @@ -2,6 +2,8 @@ name: Update documentation on: push: + tags: + - "*" branches: - master @@ -22,10 +24,14 @@ jobs: flit install --deps develop --extras oauth,redis - name: Build run: mkdocs build + - name: Parse tag + id: version_tag + uses: battila7/get-version-action@v2 - name: Get tag run: | - python -c "from packaging import version; from fastapi_users import __version__; version = version.parse(__version__); print(f'DOCS_VERSION={version.major}.{version.minor}')" >> $GITHUB_ENV + echo ${{ steps.version_tag.outputs.version }} + echo ${{ github.ref_name }} - name: Deploy run: | git fetch origin gh-pages --depth=1 - mike deploy --push --update-aliases ${{ env.DOCS_VERSION }} latest + mike deploy --push --update-aliases ${{ steps.version_tag.outputs.major }} latest