From 939094e65faaf3aa16c475c7c6a30f9ea5dd5b3c Mon Sep 17 00:00:00 2001 From: CrazyMax Date: Mon, 22 Jun 2020 03:52:40 +0200 Subject: [PATCH] Fix docs workflow --- .github/workflows/docs.yml | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index f9892703..2fd58e22 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -29,6 +29,18 @@ jobs: - name: Checkout uses: actions/checkout@v2 + - name: Prepare + id: prepare + run: | + VERSION=edge + RELEASE=false + if [[ $GITHUB_REF == refs/tags/* ]]; then + VERSION=${GITHUB_REF#refs/tags/v} + fi + if [[ $VERSION =~ ^[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}$ ]]; then + RELEASE=true + fi + echo ::set-output name=release::${RELEASE} - name: Build mkdocs Docker image run: | @@ -40,7 +52,7 @@ jobs: sudo chown -R $(id -u):$(id -g) ./site - name: Deploy - if: success() && github.event_name != 'pull_request' && (endsWith(github.ref, github.event.repository.default_branch) || startsWith(github.ref, 'refs/tags/')) + if: success() && github.event_name != 'pull_request' && (endsWith(github.ref, github.event.repository.default_branch) || steps.prepare.outputs.release == 'true') uses: crazy-max/ghaction-github-pages@v2 with: target_branch: gh-pages