Skip to content

Commit 290572b

Browse files
committed
feat: add workflow
1 parent 6a12fae commit 290572b

File tree

2 files changed

+40
-0
lines changed

2 files changed

+40
-0
lines changed

.github/workflows/publish-docs.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: Publish Dokka Docs
2+
3+
on:
4+
push:
5+
branches:
6+
- version/1.21
7+
8+
jobs:
9+
build:
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- name: Checkout code
14+
uses: actions/checkout@v4
15+
16+
- name: Set up JDK
17+
uses: actions/setup-java@v4
18+
with:
19+
distribution: 'graalvm'
20+
java-version: '21'
21+
22+
- name: Install dependencies
23+
run: ./gradlew dependencies
24+
25+
- name: Generate and move Dokka Docs
26+
run: ./gradlew publishDokkaToDocs
27+
28+
- name: Commit and Push changes
29+
run: |
30+
git config --global user.name "GitHub Actions"
31+
git config --global user.email "[email protected]"
32+
git add docs
33+
git commit -m "Update Dokka Docs"
34+
git push

build.gradle.kts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,5 +29,11 @@ tasks {
2929
)
3030
}
3131
}
32+
33+
register<Copy>("publishDokkaToDocs") {
34+
dependsOn(dokkaHtmlMultimodule)
35+
from(buildDir.resolve("dokka/htmlMultiModule"))
36+
into(rootDir.resolve("docs"))
37+
}
3238
}
3339

0 commit comments

Comments
 (0)