Skip to content

Commit 3f999bf

Browse files
committed
CI: ci config
1 parent b221aab commit 3f999bf

File tree

2 files changed

+49
-0
lines changed

2 files changed

+49
-0
lines changed

.github/workflows/deploy-website.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
name: Deploy Website
22
on:
3+
workflow_dispatch:
34
push:
45
branches:
56
# - dev/ver/v**

.github/workflows/publish-snapshot.yml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
name: Publish Snapshot
22
on:
3+
workflow_dispatch:
34
push:
45
branches:
56
- main
@@ -59,3 +60,50 @@ jobs:
5960
--build-cache
6061
-Porg.gradle.jvmargs="-Xmx4g -Xms4g -XX:MaxMetaspaceSize=2g -Dfile.encoding=UTF-8"
6162
-Porg.gradle.daemon=false
63+
64+
65+
publish-snapshot-kdoc:
66+
name: Deploy snapshots KDoc
67+
needs: publish-snapshot
68+
runs-on: ubuntu-latest
69+
steps:
70+
# 检出仓库代码
71+
- name: Check out repo
72+
uses: actions/checkout@v3
73+
with:
74+
persist-credentials: false
75+
fetch-depth: 0
76+
77+
# setup Java
78+
- name: Setup java
79+
uses: actions/setup-java@v3
80+
with:
81+
distribution: 'zulu'
82+
java-version: 11
83+
cache: 'gradle'
84+
85+
# setup Gradle
86+
- name: Gradle generate documentation
87+
uses: gradle/gradle-build-action@v2
88+
with:
89+
gradle-version: 8.3
90+
arguments: |
91+
dokkaHtmlMultiModule
92+
--info
93+
--warning-mode all
94+
-x test
95+
--build-cache
96+
-Porg.gradle.jvmargs="-XX:MaxMetaspaceSize=1g -Dfile.encoding=UTF-8"
97+
-Porg.gradle.daemon=false
98+
env:
99+
SIMBOT_IS_SNAPSHOT: true
100+
101+
# https://github.com/marketplace/actions/github-pages-action
102+
- name: Push to doc repository
103+
uses: peaceiris/actions-gh-pages@v3
104+
with:
105+
personal_token: ${{ secrets.PUSH_TOKEN }}
106+
external_repository: simple-robot-library/simbot3-api-docs
107+
publish_branch: kdoc-deploy/snapshots/component-mirai
108+
publish_dir: ./build/dokka/html
109+
destination_dir: snapshots/components/mirai

0 commit comments

Comments
 (0)