Skip to content

Commit 7de4d09

Browse files
committed
Update build.yml
1 parent c86f5b5 commit 7de4d09

File tree

1 file changed

+27
-16
lines changed

1 file changed

+27
-16
lines changed

.github/workflows/build.yml

Lines changed: 27 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,34 @@
11
name: Java CI
22

33
on:
4-
push:
5-
branches: [ "main" ]
6-
pull_request:
7-
branches: [ "main" ]
4+
push:
5+
branches: [ "main" ]
6+
pull_request:
7+
branches: [ "main" ]
88

99
jobs:
10-
build:
10+
build:
11+
runs-on: ubuntu-latest
1112

12-
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v4
1315

14-
steps:
15-
- uses: actions/checkout@v4
16-
- name: Set up JDK 17
17-
uses: actions/setup-java@v4
18-
with:
19-
java-version: '17'
20-
distribution: 'temurin'
21-
cache: maven
22-
- name: Build with Maven
23-
run: mvn -B package --file pom.xml
16+
- name: Set up JDK 21
17+
uses: actions/setup-java@v4
18+
with:
19+
java-version: '21'
20+
distribution: 'temurin'
21+
cache: maven
22+
23+
- name: Build and Test with Maven
24+
run: mvn -B verify --file pom.xml
25+
26+
- name: Generate Javadoc
27+
run: mvn javadoc:javadoc
28+
29+
- name: Deploy Javadoc to GitHub Pages
30+
if: success()
31+
uses: peaceiris/actions-gh-pages@v3
32+
with:
33+
github_token: ${{ secrets.GITHUB_TOKEN }}
34+
publish_dir: ./target/site/apidocs

0 commit comments

Comments
 (0)