Automated documentation.yml running on git tag

For release and playtest tags.
This commit is contained in:
penev92
2023-10-17 23:53:58 +03:00
committed by Gustas
parent 104801cdca
commit ead6bdecb6

View File

@@ -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