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.
@@ -37,50 +33,62 @@ jobs:
37
33
steps :
38
34
- uses : actions/checkout@v4
39
35
with :
36
+ persist-credentials : false
40
37
fetch-tags : ' true'
41
38
fetch-depth : 0
42
- - name : Set up JDK
43
- uses : actions/setup-java@v4
39
+ - uses : jdx/mise-action@7a111ead46986ccad89a74ad013ba2a7c08c9e67 # v2.1.1
44
40
with :
45
- java-version : 17
46
- distribution : temurin
47
- cache : ' maven'
41
+ cache : ' false'
48
42
- name : Set release version
49
43
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
54
46
- name : Make Javadoc
55
47
run : ./mvnw -B clean compile javadoc:javadoc javadoc:aggregate -P javadoc
48
+ with :
49
+ permissions : block
56
50
- name : Move the Javadoc to docs/static/api/
57
51
run : mv ./target/reports/apidocs ./docs/static/api && echo && echo 'ls ./docs/static/api' && ls ./docs/static/api
52
+ with :
53
+ permissions : block
58
54
- name : Setup Pages
59
55
id : pages
60
56
uses : actions/configure-pages@v5
61
57
- name : Install Node.js dependencies
62
58
run : " [[ -f package-lock.json || -f npm-shrinkwrap.json ]] && npm ci || true"
59
+ with :
60
+ permissions : block
63
61
working-directory : ./docs
64
62
- name : Build with Hugo
65
63
env :
66
64
# For maximum backward compatibility with Hugo modules
67
65
HUGO_ENVIRONMENT : production
68
66
HUGO_ENV : production
67
+ BASE_URL : " ${{ steps.pages.outputs.base_url }}"
69
68
run : |
70
69
hugo \
71
70
--gc \
72
71
--minify \
73
- --baseURL "${{ steps.pages.outputs.base_url }}/"
72
+ --baseURL "${BASE_URL}/"
73
+ with :
74
+ permissions : block
74
75
working-directory : ./docs
75
76
- name : ls ./docs/public/api
76
77
run : echo 'ls ./docs/public/api' && ls ./docs/public/api
78
+ with :
79
+ permissions : block
77
80
- name : Upload artifact
78
81
uses : actions/upload-pages-artifact@v3
79
82
with :
80
83
path : ./docs/public
84
+ # Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
81
85
82
86
# Deployment job
83
87
deploy :
88
+ permissions :
89
+ contents : read
90
+ pages : write
91
+ id-token : write
84
92
environment :
85
93
name : github-pages
86
94
url : ${{ steps.deployment.outputs.page_url }}
0 commit comments