chore: v3.0.0 #40
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: JavaDoc | |
on: | |
push: | |
branches: [main] | |
paths: [src/main/java/**] | |
workflow_dispatch: | |
jobs: | |
gen-javadoc: | |
name: Generate Javadoc | |
runs-on: ubuntu-latest | |
steps: | |
- name: Init | |
run: export LANG=ja_JP.UTF-8 | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Set up JDK 1.8 | |
uses: actions/setup-java@v1 | |
with: | |
java-version: 1.8 | |
- name: Cache local Maven repository | |
uses: actions/cache@v3 | |
with: | |
path: ~/.m2/repository | |
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} | |
- name: Generate Javadoc | |
run: mvn javadoc:javadoc --file pom.xml | |
- name: Stash | |
run: git stash -ua | |
- name: Change Branch | |
uses: actions/checkout@v2 | |
with: | |
ref: javadoc | |
- name: Apply Stash | |
run: git stash apply | |
- name: Copy Files | |
run: cp -rp ./target/site/apidocs/* . | |
- name: Remove TempFile | |
run: rm -rf target | |
- name: Commit Javadoc | |
uses: EndBug/add-and-commit@v4 | |
with: | |
author_name: Javadoc BOT | |
message: Generate Javadoc | |
force: false | |
ref: javadoc | |
env: | |
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} |