Skip to content

Commit

Permalink
workflow: publish-kdoc
Browse files Browse the repository at this point in the history
  • Loading branch information
ForteScarlet committed Jul 23, 2024
1 parent 547e459 commit 20713c0
Showing 1 changed file with 56 additions and 0 deletions.
56 changes: 56 additions & 0 deletions .github/workflows/publish-kdoc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: Publish KDoc
on:
workflow_dispatch:


env:
JAVA_VERSION: 21
JAVA_DISTRIBUTION: zulu
GRADLE_VERSION: 8.5
IS_CI: true
GPG_KEY_ID: ${{ secrets.GPG_KEY_ID }}
GPG_SECRET_KEY: ${{ secrets.GPG_SECRET_KEY }}
GPG_PASSWORD: ${{ secrets.GPG_PASSWORD }}
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
GRADLE_OPTS: "-XX:MaxMetaspaceSize=2g -Dfile.encoding=UTF-8"

jobs:
deploy-doc:
name: Deploy KDoc
runs-on: ubuntu-latest
needs: publish-releases
steps:
# 检出仓库代码
- uses: actions/checkout@v4
with:
persist-credentials: false
fetch-depth: 0
# setup Java
- uses: actions/setup-java@v4
with:
distribution: ${{ env.JAVA_DISTRIBUTION }}
java-version: ${{ env.JAVA_VERSION }}

- name: Generate documentation
uses: gradle/actions/setup-gradle@v3
with:
gradle-version: ${{ env.GRADLE_VERSION }}
arguments: |
dokkaHtmlMultiModule
--info
--warning-mode all
-x test
--build-cache
-Porg.gradle.jvmargs="-Xmx8g -Xms2g -XX:MaxMetaspaceSize=1g -Dfile.encoding=UTF-8"
- name: Push to doc repository
uses: peaceiris/actions-gh-pages@v3
with:
personal_token: ${{ secrets.PUSH_TOKEN }}
external_repository: simple-robot-library/simbot3-api-docs
publish_branch: kdoc-deploy/component-onebot
publish_dir: ./build/dokka/html
# deploy to sub dir
destination_dir: components/onebot

0 comments on commit 20713c0

Please sign in to comment.