Skip to content

Commit 3f76a27

Browse files
committed
fix: fix the new javadoc jobs
1 parent 0664612 commit 3f76a27

1 file changed

Lines changed: 7 additions & 15 deletions

File tree

.github/workflows/build.yml

Lines changed: 7 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ on:
3737
- 'pom.xml'
3838

3939
permissions:
40-
contents: write
40+
contents: read
4141
pages: write
4242
id-token: write
4343

@@ -66,38 +66,30 @@ jobs:
6666
run: mvn -B install --file pom.xml
6767

6868
- name: Generate JaCoCo Badge
69-
if: ${{ github.ref == 'refs/heads/main' && matrix.java == 17 }}
69+
if: ${{ matrix.java == 17 }}
7070
uses: cicirello/jacoco-badge-generator@72266185b7ee48a6fd74eaf0238395cc8b14fef8 # v2
7171
with:
7272
jacoco-csv-file: coverage-report/target/site/jacoco-aggregate/jacoco.csv
7373
badges-directory: coverage-report/target/site/jacoco-aggregate
7474

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-
8375
- name: Generate javadoc site
84-
if: ${{ github.ref == 'refs/heads/main' && matrix.java == 17 }}
76+
if: ${{ matrix.java == 17 }}
8577
run: mvn -B -pl sdk -am javadoc:javadoc
8678

8779
- name: Configure GitHub Pages
88-
if: ${{ github.ref == 'refs/heads/main' && matrix.java == 17 }}
80+
if: ${{ matrix.java == 17 }}
8981
uses: actions/configure-pages@v5
9082

9183
- name: Prepare GitHub Pages artifact
92-
if: ${{ github.ref == 'refs/heads/main' && matrix.java == 17 }}
84+
if: ${{ matrix.java == 17 }}
9385
run: |
9486
mkdir -p github-pages/coverage github-pages/javadoc
9587
cp -R coverage-report/target/site/jacoco-aggregate/. github-pages/coverage
96-
cp -R sdk/target/site/apidocs/. github-pages/javadoc
88+
cp -R sdk/target/reports/apidocs/. github-pages/javadoc
9789
touch github-pages/.nojekyll
9890
9991
- name: Upload GitHub Pages artifact
100-
if: ${{ github.ref == 'refs/heads/main' && matrix.java == 17 }}
92+
if: ${{ matrix.java == 17 }}
10193
uses: actions/upload-pages-artifact@v4
10294
with:
10395
path: github-pages

0 commit comments

Comments
 (0)