mirror of
https://github.com/crazy-max/diun.git
synced 2026-01-02 11:07:28 +01:00
Fix docs workflow
This commit is contained in:
14
.github/workflows/docs.yml
vendored
14
.github/workflows/docs.yml
vendored
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user