aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVadim Mishenev <vad-mishenev@yandex.ru>2022-03-22 16:23:39 +0300
committerGitHub <noreply@github.com>2022-03-22 16:23:39 +0300
commitabd29cf0d1867e895b67d6048c43864b27d7de5f (patch)
tree17df9b0c573aae8bb317f9506febe8f271862671
parent1aa01c4afdf648d1ab54897b3d5b727755b9636f (diff)
downloaddokka-abd29cf0d1867e895b67d6048c43864b27d7de5f.tar.gz
dokka-abd29cf0d1867e895b67d6048c43864b27d7de5f.tar.bz2
dokka-abd29cf0d1867e895b67d6048c43864b27d7de5f.zip
Edit GH Action to publish doc on release (#2392)
-rw-r--r--.github/workflows/gh-pages.yml8
1 files changed, 5 insertions, 3 deletions
diff --git a/.github/workflows/gh-pages.yml b/.github/workflows/gh-pages.yml
index a221dcfa..c444a3e4 100644
--- a/.github/workflows/gh-pages.yml
+++ b/.github/workflows/gh-pages.yml
@@ -4,6 +4,8 @@ on:
push:
branches:
- master
+ release:
+ types: [published]
jobs:
docs:
@@ -30,17 +32,17 @@ jobs:
- name: Get current dokka version
run: echo "DOKKA_VERSION=`./gradlew :properties | grep '^version:.*' | cut -d ' ' -f 2 | cut -d '-' -f 1`" >> $GITHUB_ENV
- if: steps.filter.outputs.docs_changed == 'true'
+ if: github.event_name == 'release' || steps.filter.outputs.docs_changed == 'true'
working-directory: ./dokka
- name: Build docs
run: ./gradlew mkdocsBuild -Pdokka_version=$DOKKA_VERSION --info
- if: steps.filter.outputs.docs_changed == 'true'
+ if: github.event_name == 'release' || steps.filter.outputs.docs_changed == 'true'
working-directory: ./dokka
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
- if: steps.filter.outputs.docs_changed == 'true'
+ if: github.event_name == 'release' || steps.filter.outputs.docs_changed == 'true'
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./dokka/docs/build/mkdocs