Skip to content

Commit

Permalink
优化KDoc;
Browse files Browse the repository at this point in the history
添加gtag;
  • Loading branch information
ForteScarlet committed Jul 23, 2024
1 parent 249d4e3 commit a8add1a
Show file tree
Hide file tree
Showing 7 changed files with 262 additions and 49 deletions.
59 changes: 59 additions & 0 deletions .github/workflows/publish-kdoc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
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-doc
runs-on: ubuntu-latest
steps:
# 检出仓库代码
- name: Check out repo
uses: actions/checkout@v4
with:
persist-credentials: false
fetch-depth: 0
# setup Java
- name: Setup java
uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: 21

# setup Gradle
- name: Gradle generate documentation
uses: gradle/actions/setup-gradle@v3
with:
gradle-version: 8.5
arguments: |
-Porg.gradle.jvmargs="-Xmx4g -Xms4g -XX:MaxMetaspaceSize=2g -Dfile.encoding=UTF-8"
-Porg.gradle.daemon=false
--info
--warning-mode all
-x test
--build-cache
dokkaHtmlMultiModule
- 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-kook
publish_dir: ./build/dokka/html
# deploy to sub dir
destination_dir: components/kook

32 changes: 25 additions & 7 deletions .simbot/dokka-assets/css/kdoc-style.css
Original file line number Diff line number Diff line change
@@ -1,8 +1,26 @@
.library-name a::before {
background: url("../images/logo-icon.svg") center no-repeat;
background-size: contain;
width: 40px;
height: 40px;
top: -12px;
left: -50px;
/*
* Copyright (c) 2024. ForteScarlet.
*
* Project https://github.com/simple-robot/simpler-robot
* Email [email protected]
*
* This file is part of the Simple Robot Library (Alias: simple-robot, simbot, etc.).
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* Lesser GNU General Public License for more details.
*
* You should have received a copy of the Lesser GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/

:root {
--dokka-logo-image-url: url('../images/logo-icon-light.svg');
}
78 changes: 78 additions & 0 deletions .simbot/dokka-assets/logo-icon-light.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit a8add1a

Please sign in to comment.