|
37 | 37 | - 'pom.xml' |
38 | 38 |
|
39 | 39 | permissions: |
40 | | - contents: write |
| 40 | + contents: read |
41 | 41 | pages: write |
42 | 42 | id-token: write |
43 | 43 |
|
@@ -66,38 +66,30 @@ jobs: |
66 | 66 | run: mvn -B install --file pom.xml |
67 | 67 |
|
68 | 68 | - name: Generate JaCoCo Badge |
69 | | - if: ${{ github.ref == 'refs/heads/main' && matrix.java == 17 }} |
| 69 | + if: ${{ matrix.java == 17 }} |
70 | 70 | uses: cicirello/jacoco-badge-generator@72266185b7ee48a6fd74eaf0238395cc8b14fef8 # v2 |
71 | 71 | with: |
72 | 72 | jacoco-csv-file: coverage-report/target/site/jacoco-aggregate/jacoco.csv |
73 | 73 | badges-directory: coverage-report/target/site/jacoco-aggregate |
74 | 74 |
|
75 | | - - name: Publish coverage report to GitHub Pages |
76 | | - if: ${{ github.ref == 'refs/heads/main' && matrix.java == 17 }} |
77 | | - uses: JamesIves/github-pages-deploy-action@d92aa235d04922e8f08b40ce78cc5442fcfbfa2f # v4 |
78 | | - with: |
79 | | - branch: docs |
80 | | - folder: coverage-report/target/site/jacoco-aggregate |
81 | | - target-folder: coverage |
82 | | - |
83 | 75 | - name: Generate javadoc site |
84 | | - if: ${{ github.ref == 'refs/heads/main' && matrix.java == 17 }} |
| 76 | + if: ${{ matrix.java == 17 }} |
85 | 77 | run: mvn -B -pl sdk -am javadoc:javadoc |
86 | 78 |
|
87 | 79 | - name: Configure GitHub Pages |
88 | | - if: ${{ github.ref == 'refs/heads/main' && matrix.java == 17 }} |
| 80 | + if: ${{ matrix.java == 17 }} |
89 | 81 | uses: actions/configure-pages@v5 |
90 | 82 |
|
91 | 83 | - name: Prepare GitHub Pages artifact |
92 | | - if: ${{ github.ref == 'refs/heads/main' && matrix.java == 17 }} |
| 84 | + if: ${{ matrix.java == 17 }} |
93 | 85 | run: | |
94 | 86 | mkdir -p github-pages/coverage github-pages/javadoc |
95 | 87 | cp -R coverage-report/target/site/jacoco-aggregate/. github-pages/coverage |
96 | 88 | cp -R sdk/target/site/apidocs/. github-pages/javadoc |
97 | 89 | touch github-pages/.nojekyll |
98 | 90 |
|
99 | 91 | - name: Upload GitHub Pages artifact |
100 | | - if: ${{ github.ref == 'refs/heads/main' && matrix.java == 17 }} |
| 92 | + if: ${{ matrix.java == 17 }} |
101 | 93 | uses: actions/upload-pages-artifact@v4 |
102 | 94 | with: |
103 | 95 | path: github-pages |
|
0 commit comments