Merge pull request #7 from aseemsavio/github-workflow #3
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: Publish Dokka HTML to GitHub Pages | |
on: | |
push: | |
branches: | |
- master | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Set up JDK 17 | |
uses: actions/setup-java@v2 | |
with: | |
java-version: 17 | |
distribution: 'adopt' | |
- name: Build Dokka HTML | |
run: ./gradlew dokkaHtml | |
- name: Move Dokka HTML to Docs Directory | |
run: | | |
mkdir -p docs | |
mv build/dokka/html/* docs/ | |
if: success() | |
- name: Deploy to GitHub Pages | |
uses: peaceiris/actions-gh-pages@v3 | |
with: | |
github_token: ${{ secrets.TOKEN_GITHUB }} | |
publish_dir: docs |