1- name : build main
1+ name : Build Main / Version Branch
22
33on :
44 push :
55 branches :
66 - master
77 - 1.*
88 - 2.*
9+ - 3.*
910
1011jobs :
1112 build :
@@ -15,35 +16,39 @@ jobs:
1516
1617 runs-on : ${{ matrix.os }}
1718 steps :
18-
1919 - uses : actions/checkout@v5
2020
21- - name : Set up JDK 17
21+ - name : Set up JDK
2222 uses : actions/setup-java@v5
2323 with :
2424 distribution : ' temurin'
2525 java-version : ' 17'
2626 cache : ' maven'
27+ cache-dependency-path : ' **/pom.xml'
2728
28- - name : Cache node modules
29- uses : actions/cache@v4
30- env :
31- cache-name : cache-node-modules
29+ - name : Set up Node
30+ uses : actions/setup-node@v4
3231 with :
33- path : ~/.npm
34- key : ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
35- restore-keys : |
36- ${{ runner.os }}-build-${{ env.cache-name }}-
32+ node-version : ' lts/*'
33+ cache : ' npm'
34+ cache-dependency-path : ' **/package-lock.json'
3735
38- # since we also build on Windows Powershell, we need to add a space between -D maven.javadoc.skip=true
39- # otherwise the build will fail https://stackoverflow.com/questions/38051787/maven-javadoc-skip-true-throws-an-error
4036 - name : Build with Maven
41- run : |
42- ./mvnw -B verify -P coverage --no-transfer-progress -D maven.javadoc.skip=true
37+ run : ./mvnw -B --no-transfer-progress install -P coverage
4338
44- - uses : codecov/codecov-action@v5
39+ - name : Upload surefire reports
40+ if : always()
41+ uses : actions/upload-artifact@v4
4542 with :
46- files : " '*/jacoco.xml'"
43+ name : surefire-reports
44+ path : |
45+ **/target/surefire-reports/*.xml
46+ **/target/surefire-reports/*.txt
47+ **/target/surefire-reports/*.dump*
48+ **/target/surefire-reports/*.out
49+ **/target/surefire-reports/*.err
50+ if-no-files-found : warn
51+ retention-days : 14
4752
4853 publish-snapshot :
4954 needs : build
@@ -52,24 +57,20 @@ jobs:
5257 steps :
5358 - uses : actions/checkout@v5
5459
55- - name : Set up JDK 17
60+ - name : Set up JDK
5661 uses : actions/setup-java@v5
5762 with :
5863 distribution : ' temurin'
5964 java-version : ' 17'
6065 cache : ' maven'
66+ cache-dependency-path : ' **/pom.xml'
6167
62- - name : Cache node modules
63- uses : actions/cache@v4
64- env :
65- cache-name : cache-node-modules
68+ - name : Set up Node
69+ uses : actions/setup-node@v4
6670 with :
67- path : ~/.npm
68- key : ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
69- restore-keys : |
70- ${{ runner.os }}-build-${{ env.cache-name }}-
71- ${{ runner.os }}-build-
72- ${{ runner.os }}-
71+ node-version : ' lts/*'
72+ cache : ' npm'
73+ cache-dependency-path : ' **/package-lock.json'
7374
7475 - name : Publish SNAPSHOT version to GitHub Packages (we can skip tests, since we only deploy, if the build workflow succeeded)
7576 run : ./mvnw -B --no-transfer-progress deploy -DskipTests
@@ -83,10 +84,13 @@ jobs:
8384 - name : Show extracted Maven project version
8485 run : echo ${{ steps.project.outputs.version }}
8586
86- - name : Deploy Asciidoc docs output to GitHub Pages
87+ - name : Build documentation with Maven
88+ run : ./mvnw -B --no-transfer-progress site
89+
90+ - name : Deploy documentation to GitHub Pages
87918892 with :
89- branch : gh-pages # The branch the action should deploy to.
90- folder : spring-boot-admin-docs/target/generated-docs # The folder the action should deploy.
93+ branch : gh-pages
94+ folder : spring-boot-admin-docs/target/generated-docs/build
9195 target-folder : ${{ steps.project.outputs.version }}
9296 clean : true # Automatically remove deleted files from the deploy branch
0 commit comments