File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- name : CI
1+ name : Java CI with Maven
22
33on :
44 push :
5- branches : [ master ]
5+ branches : [ " master" ]
66 pull_request :
7- branches : [ master ]
8-
9- permissions :
10- contents : read
7+ branches : [ "master" ]
118
129jobs :
1310 build :
@@ -17,27 +14,36 @@ jobs:
1714 - uses : actions/checkout@v4
1815
1916 - name : Set up JDK 17
20- uses : actions/setup-java@v4
17+ uses : actions/setup-java@v3
2118 with :
22- distribution : ' temurin'
2319 java-version : ' 17'
20+ distribution : ' temurin'
2421
25- - name : Build with Maven
26- run : mvn -B clean verify
27-
28- - name : Generate Javadoc
29- run : mvn javadoc:javadoc
22+ - name : Build and generate Javadoc
23+ run : mvn -B verify
3024
31- - name : Upload Javadoc to GitHub Pages
32- if : github.ref == 'refs/heads/master'
25+ - name : Copy Javadoc to temp folder
3326 run : |
3427 mkdir -p temp-docs
3528 cp -R target/site/apidocs/* temp-docs/
3629
30+ - name : Create redirect index.html
31+ run : |
32+ echo '<!DOCTYPE html>
33+ <html lang="en">
34+ <head>
35+ <meta http-equiv="refresh" content="0; url=overview-summary.html">
36+ <title>Redirecting…</title>
37+ </head>
38+ <body>
39+ <p>If you are not redirected automatically, follow this <a href="overview-summary.html">link</a>.</p>
40+ </body>
41+ </html>' > temp-docs/index.html
42+
3743 - name : Deploy to GitHub Pages
3844 uses : peaceiris/actions-gh-pages@v3
3945 with :
4046 github_token : ${{ secrets.GH_PAGES_TOKEN }}
4147 publish_dir : ./temp-docs
4248 publish_branch : gh-pages
43- force_orphan : true
49+ force_orphan : true
You can’t perform that action at this time.
0 commit comments