44 lines (35 loc) · 1.09 KB
/
publish_docs.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
name: Publish Docs
# Every time we merge to the main branch we publish the docs.
on:
push:
branches: [ main ]
workflow_dispatch:
jobs:
publish-to-github-pages:
runs-on: ubuntu-latest
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
# https://github.com/marketplace/actions/checkout
- uses: actions/checkout@v4
# Setup Java 17
# https://github.com/marketplace/actions/setup-java-jdk
- name: Set up JDK
uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: 17
- name: Gradle cache
uses: gradle/actions/setup-gradle@v3
with:
cache-read-only: true
- name: Grant execute permission for gradlew
run: chmod +x gradlew
# Generate kdocs
- name: Generate Dokka HTML documentation
run: ./gradlew dokkaHtmlMultiModule
# Deploy to GitHub Pages
- name: Deploy GitHub Pages
uses: JamesIves/github-pages-deploy-action@v4.6.0
with:
BRANCH: gh-pages
FOLDER: build/docs/