Skip to content

Commit 9d127a9

Browse files
bactgoneall
authored andcommitted
Add Javadoc build workflow
Signed-off-by: Arthit Suriyawongkul <arthit@gmail.com>
1 parent e7071e1 commit 9d127a9

1 file changed

Lines changed: 36 additions & 0 deletions

File tree

.github/workflows/docs.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Generate and publish API JavaDocs
2+
3+
on:
4+
push:
5+
branches: [ master ]
6+
7+
jobs:
8+
docs:
9+
runs-on: ubuntu-latest
10+
11+
steps:
12+
- name: Checkout repository
13+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
14+
with:
15+
fetch-depth: 0
16+
17+
- name: Set up JDK
18+
uses: actions/setup-java@dded0888837ed1f317902acf8a20df0ad188d165 # v5.0.0
19+
with:
20+
distribution: 'temurin'
21+
java-version: 17
22+
23+
- name: Cache Maven packages
24+
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
25+
with:
26+
path: ~/.m2
27+
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
28+
29+
- name: Generate docs
30+
run: mvn javadoc:javadoc
31+
32+
- name: Deploy docs
33+
uses: peaceiris/actions-gh-pages@4f9cc6602d3f66b9c108549d475ec49e8ef4d45e # v4.0.0
34+
with:
35+
github_token: ${{ secrets.GITHUB_TOKEN }}
36+
publish_dir: ./target/reports/apidocs

0 commit comments

Comments
 (0)