-
Notifications
You must be signed in to change notification settings - Fork 1
43 lines (35 loc) · 1.01 KB
/
deploy_javadoc.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
name: Deploy Javadoc to GitHub Pages
on:
push:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up JDK 21
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '21'
- name: Set up Maven
run: mvn -B wrapper:wrapper
- name: Generate Javadoc
run: mvn -B javadoc:javadoc
# By default, this generates Javadoc in the target/site/apidocs/ directory
- name: Verify Javadoc Directory
run: |
if [ -d "target/site/apidocs" ]; then
echo "Javadoc generated successfully";
ls -la target/site/apidocs;
else
echo "Javadoc directory not found!";
exit 1;
fi
- name: Deploy Javadoc to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: target/site/apidocs