1111 # Allows you to run this workflow manually from the Actions tab
1212 workflow_dispatch :
1313
14- # Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
15- permissions :
16- contents : read
17- pages : write
18- id-token : write
14+ permissions : {}
1915
2016# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
2117# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
@@ -32,55 +28,38 @@ jobs:
3228 # Build job
3329 build :
3430 runs-on : ubuntu-24.04
35- env :
36- HUGO_VERSION : 0.115.4
3731 steps :
3832 - uses : actions/checkout@v4
3933 with :
34+ persist-credentials : false
4035 fetch-tags : ' true'
4136 fetch-depth : 0
42- - name : Set up JDK
43- uses : actions/setup-java@v4
37+ - uses : jdx/mise-action@7a111ead46986ccad89a74ad013ba2a7c08c9e67 # v2.1.1
4438 with :
45- java-version : 17
46- distribution : temurin
47- cache : ' maven'
48- - name : Set release version
49- run : ./scripts/set-release-version-github-pages.sh
50- - name : Install Hugo CLI
51- run : |
52- wget -O ${{ runner.temp }}/hugo.deb https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_extended_${HUGO_VERSION}_linux-amd64.deb \
53- && sudo dpkg -i ${{ runner.temp }}/hugo.deb
54- - name : Make Javadoc
55- run : ./mvnw -B clean compile javadoc:javadoc javadoc:aggregate -P javadoc
56- - name : Move the Javadoc to docs/static/api/
57- run : mv ./target/reports/apidocs ./docs/static/api && echo && echo 'ls ./docs/static/api' && ls ./docs/static/api
39+ cache : ' false'
40+ - name : Prepare GitHub Pages
41+ run : mise run prepare-gh-pages
42+ with :
43+ permissions : block
5844 - name : Setup Pages
5945 id : pages
6046 uses : actions/configure-pages@v5
61- - name : Install Node.js dependencies
62- run : " [[ -f package-lock.json || -f npm-shrinkwrap.json ]] && npm ci || true"
63- working-directory : ./docs
64- - name : Build with Hugo
65- env :
66- # For maximum backward compatibility with Hugo modules
67- HUGO_ENVIRONMENT : production
68- HUGO_ENV : production
69- run : |
70- hugo \
71- --gc \
72- --minify \
73- --baseURL "${{ steps.pages.outputs.base_url }}/"
74- working-directory : ./docs
75- - name : ls ./docs/public/api
76- run : echo 'ls ./docs/public/api' && ls ./docs/public/api
47+ - name : Build GitHub Pages
48+ run : mise run build-gh-pages
49+ with :
50+ permissions : block
7751 - name : Upload artifact
7852 uses : actions/upload-pages-artifact@v3
7953 with :
8054 path : ./docs/public
55+ # Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
8156
8257 # Deployment job
8358 deploy :
59+ permissions :
60+ contents : read
61+ pages : write
62+ id-token : write
8463 environment :
8564 name : github-pages
8665 url : ${{ steps.deployment.outputs.page_url }}
0 commit comments