diff options
author | Ignat Beresnev <ignat.beresnev@jetbrains.com> | 2023-04-21 18:29:22 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-04-21 18:29:22 +0200 |
commit | eb50c4f28d978fcd914b819d523e8da607d05b0c (patch) | |
tree | 87041774b82c0af473e3766089f67d939f901eee /.github/workflows/gh-pages-deploy-mkdocs.yml | |
parent | de63c4479bcd9a81db25b5432df82edb98119410 (diff) | |
download | dokka-eb50c4f28d978fcd914b819d523e8da607d05b0c.tar.gz dokka-eb50c4f28d978fcd914b819d523e8da607d05b0c.tar.bz2 dokka-eb50c4f28d978fcd914b819d523e8da607d05b0c.zip |
Clean up GitHub workflows (#2951)
* Run Gradle wrapper checksum less often
* Do not publish examples as artifacts in internal PRs
Diffstat (limited to '.github/workflows/gh-pages-deploy-mkdocs.yml')
-rw-r--r-- | .github/workflows/gh-pages-deploy-mkdocs.yml | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/.github/workflows/gh-pages-deploy-mkdocs.yml b/.github/workflows/gh-pages-deploy-mkdocs.yml new file mode 100644 index 00000000..b212f55b --- /dev/null +++ b/.github/workflows/gh-pages-deploy-mkdocs.yml @@ -0,0 +1,40 @@ +name: Deploy MkDocs to GitHub Pages + +on: + push: + branches: + - master + paths: + - 'mkdocs/**' + release: + types: [ published ] + +jobs: + docs: + if: github.repository == 'Kotlin/dokka' + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + with: + path: dokka + - uses: actions/setup-java@v3 + with: + distribution: 'zulu' + java-version: 17 + cache: 'maven' + - uses: gradle/gradle-build-action@v2 + with: + gradle-home-cache-cleanup: true + - name: Get current dokka version + run: echo "DOKKA_VERSION=`./gradlew :properties | grep '^version:.*' | cut -d ' ' -f 2`" >> $GITHUB_ENV + working-directory: ./dokka + - name: Build docs + run: ./gradlew mkdocsBuild -Pdokka_version=$DOKKA_VERSION --info + working-directory: ./dokka + - name: Deploy + uses: peaceiris/actions-gh-pages@v3 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: ./dokka/mkdocs/build/mkdocs + keep_files: true + full_commit_message: Publish ${{ env.DOKKA_VERSION }} documentation |