11
11
# Allows you to run this workflow manually from the Actions tab
12
12
workflow_dispatch :
13
13
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 : {}
19
15
20
16
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
21
17
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
@@ -32,55 +28,38 @@ jobs:
32
28
# Build job
33
29
build :
34
30
runs-on : ubuntu-24.04
35
- env :
36
- HUGO_VERSION : 0.115.4
37
31
steps :
38
32
- uses : actions/checkout@v4
39
33
with :
34
+ persist-credentials : false
40
35
fetch-tags : ' true'
41
36
fetch-depth : 0
42
- - name : Set up JDK
43
- uses : actions/setup-java@v4
37
+ - uses : jdx/mise-action@7a111ead46986ccad89a74ad013ba2a7c08c9e67 # v2.1.1
44
38
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
58
44
- name : Setup Pages
59
45
id : pages
60
46
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
77
51
- name : Upload artifact
78
52
uses : actions/upload-pages-artifact@v3
79
53
with :
80
54
path : ./docs/public
55
+ # Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
81
56
82
57
# Deployment job
83
58
deploy :
59
+ permissions :
60
+ contents : read
61
+ pages : write
62
+ id-token : write
84
63
environment :
85
64
name : github-pages
86
65
url : ${{ steps.deployment.outputs.page_url }}
0 commit comments