File tree Expand file tree Collapse file tree 1 file changed +42
-0
lines changed
Expand file tree Collapse file tree 1 file changed +42
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Deploy Maven Javadocs to GitHub Pages
2+
3+ on :
4+ push :
5+ branches :
6+ - main
7+
8+ jobs :
9+ build-and-deploy :
10+ runs-on : ubuntu-latest
11+
12+ steps :
13+ - name : Checkout code
14+ uses : actions/checkout@v3
15+
16+ - name : Set up JDK
17+ uses : actions/setup-java@v3
18+ with :
19+ distribution : ' temurin'
20+ java-version : ' 21'
21+
22+ - name : Cache Maven repository
23+ uses : actions/cache@v3
24+ with :
25+ path : ~/.m2
26+ key : ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
27+ restore-keys : |
28+ ${{ runner.os }}-maven-
29+
30+ - name : Build Javadocs
31+ run : mvn clean javadoc:javadoc
32+
33+ - name : Add CNAME file
34+ run : |
35+ echo "jd.slz.zetaplugins.com" > target/reports/apidocs/CNAME
36+
37+ # Step 6: Deploy to GitHub Pages
38+ - name : Deploy to GitHub Pages
39+ uses : peaceiris/actions-gh-pages@v3
40+ with :
41+ github_token : ${{ secrets.GITHUB_TOKEN }}
42+ publish_dir : target/reports/apidocs
You can’t perform that action at this time.
0 commit comments