Skip to content

Commit 075aa3c

Browse files
Fixing GitHub workflow for JavaDoc building
1 parent 907e6d1 commit 075aa3c

File tree

1 file changed

+24
-8
lines changed

1 file changed

+24
-8
lines changed

.github/workflows/publish-javadoc.yml

Lines changed: 24 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,22 +3,38 @@ name: Deploy Javadoc
33
on:
44
push:
55
branches:
6-
- master
76
- main
7+
- master
8+
workflow_dispatch:
9+
10+
permissions:
11+
contents: write
812

913
jobs:
1014
publish:
1115
runs-on: ubuntu-latest
16+
1217
steps:
1318
- name: Checkout repository
1419
uses: actions/checkout@v4
1520

16-
- name: Deploy JavaDoc 🚀
17-
uses: MathieuSoysal/Javadoc-publisher.yml@v3.0.2
21+
- name: Set up Java
22+
uses: actions/setup-java@v4
1823
with:
19-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
20-
javadoc-branch: javadoc
24+
distribution: temurin
2125
java-version: 17
22-
target-folder: javadoc # url will be https://<username>.github.io/<repo>/javadoc, This can be left as nothing to generate javadocs in the root folder.
23-
project: maven # or gradle
24-
# subdirectories: moduleA moduleB #for subdirectories support, needs to be run with custom command
26+
27+
- name: Build Javadoc
28+
run: mvn javadoc:javadoc
29+
30+
- name: Prepare Javadoc folder
31+
run: |
32+
mkdir -p publish/javadoc
33+
cp -r target/site/apidocs/* publish/javadoc/
34+
35+
- name: Deploy to GitHub Pages
36+
uses: peaceiris/actions-gh-pages@v4
37+
with:
38+
github_token: ${{ secrets.GITHUB_TOKEN }}
39+
publish_branch: gh-pages
40+
publish_dir: publish

0 commit comments

Comments
 (0)