mirror of
https://github.com/CarmJos/UltraDepository.git
synced 2024-09-19 19:55:45 +00:00
CarmJos
976d9c32ff
- [U] 采用EasyPlugin项目代码,并将此项目作为示范项目。 - [A] 添加数个事件,便于其他插件的开发。 - [A] 提供JSON存储格式,便于其他情况下的使用。 - [U] 添加StorageMethod枚举类,并允许自定义存储源。 - [U] 不再强制为数据加上 “:0”数据结尾,简化数据格式。
78 lines
2.3 KiB
YAML
78 lines
2.3 KiB
YAML
# This workflow will build a Java project with Maven, and cache/restore any dependencies to improve the workflow execution time
|
|
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven
|
|
|
|
name: Javadoc
|
|
|
|
on:
|
|
# 支持手动触发构建
|
|
workflow_dispatch:
|
|
release:
|
|
# 创建release的时候触发
|
|
types: [ published ]
|
|
|
|
jobs:
|
|
api-website:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout the repo
|
|
uses: actions/checkout@v2
|
|
|
|
- name: Set up the Java JDK
|
|
uses: actions/setup-java@v2
|
|
with:
|
|
java-version: '11'
|
|
distribution: 'adopt'
|
|
cache: maven
|
|
server-id: github
|
|
server-username: MAVEN_USERNAME
|
|
server-password: MAVEN_TOKEN
|
|
|
|
- name: Generate docs
|
|
run: mvn clean package -DskipTests
|
|
|
|
- name: Copy to Location
|
|
run: |
|
|
rm -rf docs
|
|
mkdir -vp docs
|
|
cp -vrf target/apidocs/* docs/
|
|
cp -vrf .documentation/JAVADOC-README.md docs/README.md
|
|
|
|
- name: Generate the sitemap
|
|
id: sitemap
|
|
uses: cicirello/generate-sitemap@v1
|
|
with:
|
|
base-url-path: https://carmjos.github.io/UltraDepository
|
|
path-to-root: docs
|
|
|
|
- name: Output stats
|
|
run: |
|
|
echo "sitemap-path = ${{ steps.sitemap.outputs.sitemap-path }}"
|
|
echo "url-count = ${{ steps.sitemap.outputs.url-count }}"
|
|
echo "excluded-count = ${{ steps.sitemap.outputs.excluded-count }}"
|
|
|
|
- name: Configure Git
|
|
env:
|
|
DEPLOY_PRI: ${{secrets.DEPLOY_PRI}}
|
|
run: |
|
|
sudo timedatectl set-timezone "Asia/Shanghai"
|
|
mkdir -p ~/.ssh/
|
|
echo "$DEPLOY_PRI" > ~/.ssh/id_rsa
|
|
chmod 600 ~/.ssh/id_rsa
|
|
ssh-keyscan github.com >> ~/.ssh/known_hosts
|
|
git config --global user.name 'CarmJos'
|
|
git config --global user.email 'carm@carm.cc'
|
|
|
|
- name: Commit documentation changes
|
|
run: |
|
|
cd docs
|
|
git init
|
|
git remote add origin git@github.com:CarmJos/UltraDepository.git
|
|
git checkout -b gh-pages
|
|
git add -A
|
|
git commit -m "API Document generated."
|
|
- name: Push javadocs
|
|
run: |
|
|
cd docs
|
|
git push origin HEAD:gh-pages --force
|
|
|