Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Generate and publish Kotter docs to GitHub pages | |
# Thanks to: https://medium.com/@danieljimgarcia/publishing-static-sites-to-github-pages-using-github-actions-8040f57dfeaf | |
on: | |
release: | |
types: | |
- published | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-java@v4 | |
with: | |
distribution: temurin | |
java-version: 11 | |
- name: Setup Gradle | |
uses: gradle/actions/setup-gradle@v3 | |
- name: Generate documentation via dokka | |
run: | | |
${{github.workspace}}/gradlew :kotter:dokkaHtml | |
- name: Init temporary repo in docs folder | |
run: | | |
cd kotter/build/dokka/html | |
git init | |
git add -A | |
git config --local user.email "action@github.com" | |
git config --local user.name "GitHub Gen Docs Action" | |
git commit -m 'Deploy latest docs' | |
- name: Force push to GitHub pages | |
uses: ad-m/github-push-action@v0.6.0 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
branch: gh-pages | |
force: true | |
directory: ./kotter/build/dokka/html |