diff --git a/.github/workflows/documentation.yml b/.github/workflows/documentation.yml index 6f2f6257cf..9360a59e90 100644 --- a/.github/workflows/documentation.yml +++ b/.github/workflows/documentation.yml @@ -1,6 +1,8 @@ name: Deploy Documentation on: + push: + tags: [ 'release-*', 'playtest-*' ] workflow_dispatch: inputs: tag: @@ -70,9 +72,15 @@ jobs: steps: - name: Prepare environment variables run: | - VERSION=`echo "${{ github.event.inputs.tag }}" | cut -d"-" -f1` - echo "GIT_TAG=${{ github.event.inputs.tag }}" >> $GITHUB_ENV - echo "VERSION=$VERSION" >> $GITHUB_ENV + if [ "${{ github.event_name }}" = "push" ]; then + VERSION=`echo "${GITHUB_REF#refs/tags/}" | cut -d"-" -f1` + echo "GIT_TAG=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV + echo "VERSION=$VERSION" >> $GITHUB_ENV + else + VERSION=`echo "${{ github.event.inputs.tag }}" | cut -d"-" -f1` + echo "GIT_TAG=${{ github.event.inputs.tag }}" >> $GITHUB_ENV + echo "VERSION=$VERSION" >> $GITHUB_ENV + fi - name: Clone Repository uses: actions/checkout@v3