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.
@@ -37,50 +33,62 @@ jobs:
3733 steps :
3834 - uses : actions/checkout@v4
3935 with :
36+ persist-credentials : false
4037 fetch-tags : ' true'
4138 fetch-depth : 0
42- - name : Set up JDK
43- uses : actions/setup-java@v4
39+ - uses : jdx/mise-action@7a111ead46986ccad89a74ad013ba2a7c08c9e67 # v2.1.1
4440 with :
45- java-version : 17
46- distribution : temurin
47- cache : ' maven'
41+ cache : ' false'
4842 - name : Set release version
4943 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
44+ with :
45+ permissions : block
5446 - name : Make Javadoc
5547 run : ./mvnw -B clean compile javadoc:javadoc javadoc:aggregate -P javadoc
48+ with :
49+ permissions : block
5650 - name : Move the Javadoc to docs/static/api/
5751 run : mv ./target/reports/apidocs ./docs/static/api && echo && echo 'ls ./docs/static/api' && ls ./docs/static/api
52+ with :
53+ permissions : block
5854 - name : Setup Pages
5955 id : pages
6056 uses : actions/configure-pages@v5
6157 - name : Install Node.js dependencies
6258 run : " [[ -f package-lock.json || -f npm-shrinkwrap.json ]] && npm ci || true"
59+ with :
60+ permissions : block
6361 working-directory : ./docs
6462 - name : Build with Hugo
6563 env :
6664 # For maximum backward compatibility with Hugo modules
6765 HUGO_ENVIRONMENT : production
6866 HUGO_ENV : production
67+ BASE_URL : " ${{ steps.pages.outputs.base_url }}"
6968 run : |
7069 hugo \
7170 --gc \
7271 --minify \
73- --baseURL "${{ steps.pages.outputs.base_url }}/"
72+ --baseURL "${BASE_URL}/"
73+ with :
74+ permissions : block
7475 working-directory : ./docs
7576 - name : ls ./docs/public/api
7677 run : echo 'ls ./docs/public/api' && ls ./docs/public/api
78+ with :
79+ permissions : block
7780 - name : Upload artifact
7881 uses : actions/upload-pages-artifact@v3
7982 with :
8083 path : ./docs/public
84+ # Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
8185
8286 # Deployment job
8387 deploy :
88+ permissions :
89+ contents : read
90+ pages : write
91+ id-token : write
8492 environment :
8593 name : github-pages
8694 url : ${{ steps.deployment.outputs.page_url }}
0 commit comments