diff --git a/.github/workflows/deploy-docs-latest.yml b/.github/workflows/deploy-docs-latest.yml index 3f04dae..a7baf53 100644 --- a/.github/workflows/deploy-docs-latest.yml +++ b/.github/workflows/deploy-docs-latest.yml @@ -1,14 +1,8 @@ name: Deploy LATEST DOCS on: - workflow_run: - workflows: ["Bump version"] - types: - - completed push: - branches: - - main - paths: - - 'documentation/**' + tags: + - 'v*.*.*' permissions: contents: write jobs: @@ -23,7 +17,10 @@ jobs: - uses: actions/setup-python@v5 with: python-version: 3.x - - run: echo "cache_id=$(date --utc '+%V')" >> $GITHUB_ENV + - run: echo "cache_id=$(date --utc '+%V')" >> $GITHUB_ENV + - name: Set version + id: vars + run: echo "tag=${GITHUB_REF#refs/*/}" >> $GITHUB_OUTPUT - uses: actions/cache@v4 with: key: mkdocs-material-${{ env.cache_id }} @@ -33,8 +30,10 @@ jobs: - run: pip install mkdocs-material - run: pip install mike - name: Build and Deploy + env: + RELEASE_VERSION: ${{ steps.vars.outputs.tag }} working-directory: ./documentation run: | git fetch origin - mike deploy --update-alias --push 1.0 latest + mike deploy --update-alias --push $RELEASE_VERSION latest mike set-default latest --push \ No newline at end of file