mirror of
https://github.com/CarmJos/UserPrefix.git
synced 2026-06-05 00:35:02 +08:00
测试Javadoc部署
This commit is contained in:
@@ -0,0 +1,60 @@
|
||||
# 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'
|
||||
|
||||
- name: Generate docs
|
||||
run: mvn javadoc:javadoc
|
||||
|
||||
- name: Copy to Location
|
||||
run: |
|
||||
rm -rf docs
|
||||
cp -rf target/site/apidocs/. docs
|
||||
|
||||
- name: Tidy up
|
||||
id: tidy
|
||||
uses: cicirello/javadoc-cleanup@v1
|
||||
with:
|
||||
base-url-path: https://carmjos.github.io/userprefix
|
||||
path-to-root: docs
|
||||
|
||||
- name: Log output
|
||||
run: |
|
||||
echo "modified-count = ${{ steps.tidy.outputs.modified-count }}"
|
||||
|
||||
- name: Commit documentation changes
|
||||
run: |
|
||||
if [[ `git status --porcelain` ]]; then
|
||||
git config --global user.name '${{ github.repository_owner }}'
|
||||
git config --global user.email '${{ github.repository_owner }}@users.noreply.github.com'
|
||||
git add -A
|
||||
git commit -m "Automated API website updates."
|
||||
git push
|
||||
fi
|
||||
|
||||
- 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 }}"
|
||||
|
||||
Reference in New Issue
Block a user