Fix docs workflow

This commit is contained in:
CrazyMax
2020-06-22 03:52:40 +02:00
parent 8b759710b1
commit 939094e65f

View File

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