Skip to content

Commit 863b63b

Browse files
committed
Add CI for deploying the documentation website
1 parent 40a97c2 commit 863b63b

File tree

2 files changed

+21
-1
lines changed

2 files changed

+21
-1
lines changed

.github/workflows/release.yml

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ on:
44
workflow_dispatch: # add manually button
55

66
jobs:
7-
publish-maven:
7+
release:
88
runs-on: ubuntu-latest
99
steps:
1010
- uses: actions/checkout@v4
@@ -18,10 +18,22 @@ jobs:
1818
uses: gradle/gradle-build-action@v2
1919
with:
2020
arguments: |
21+
docs:all
2122
publish
2223
env:
2324
ORG_GRADLE_PROJECT_signingKeyId: ${{ secrets.ORG_GRADLE_PROJECT_signingKeyId }}
2425
ORG_GRADLE_PROJECT_signingKey: ${{ secrets.ORG_GRADLE_PROJECT_signingKey }}
2526
ORG_GRADLE_PROJECT_signingPassword: ${{ secrets.ORG_GRADLE_PROJECT_signingPassword }}
2627
ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.ORG_GRADLE_PROJECT_mavenCentralUsername }}
2728
ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.ORG_GRADLE_PROJECT_mavenCentralPassword }}
29+
30+
- uses: manyuanrong/[email protected]
31+
with:
32+
endpoint: ${{ secrets.OSS_ACCESS_ENDPOINT }}
33+
access-key-id: ${{ secrets.OSS_ACCESS_KEY_ID }}
34+
access-key-secret: ${{ secrets.OSS_ACCESS_KEY_SECRET }}
35+
36+
- name: Deploy documentation website
37+
run: |
38+
unzip -q -d docs/build/all docs/build/tai-e-docs.zip
39+
ossutil cp docs/build/all oss://${{ secrets.OSS_BUCKET_NAME }}/docs -rf

docs/build.gradle.kts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,4 +73,12 @@ task("all", type = Zip::class) {
7373
from(rootProject.layout.buildDirectory.dir("docs/javadoc")) {
7474
into("$projectVersion/api")
7575
}
76+
if (!isSnapshot) {
77+
from(layout.buildDirectory.dir("docs/asciidoc")) {
78+
into("current/reference")
79+
}
80+
from(rootProject.layout.buildDirectory.dir("docs/javadoc")) {
81+
into("current/api")
82+
}
83+
}
7684
}

0 commit comments

Comments
 (0)