39
39
GO_VERISON : " 1.21" # Go version used for `hugo mod get`
40
40
HUGO_VERSION : " 0.115.3" # Hugo version used for building docs
41
41
THEME_MODULE : " github.com/nginxinc/nginx-hugo-theme" # Name of source repo for module. For example; github.com/nginxinc/nginx-hugo-theme
42
- THEME_VERSION : " 0.41.10" # Version of theme module. For example; 0.41.6
43
42
44
43
PR_NUMBER : ${{github.event.pull_request.number}}
45
44
@@ -129,6 +128,10 @@ jobs:
129
128
- name : Checkout docs content
130
129
uses : actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.7.1
131
130
131
+ - name : Get latest hugo theme
132
+ if : inputs.doc_type == 'hugo'
133
+ run : echo "THEME_VERSION=$(curl -s https://api.github.com/repos/nginxinc/nginx-hugo-theme/releases/latest | jq -r ".tag_name")" >> "$GITHUB_ENV"
134
+
132
135
# ## Hugo builds
133
136
134
137
- name : Setup Go
@@ -147,14 +150,14 @@ jobs:
147
150
if : inputs.doc_type == 'hugo' && (github.event.action == 'synchronize' || github.event.action == 'opened' || env.DEPLOYMENT_ENV == 'preview')
148
151
working-directory : ${{inputs.docs_build_path}}
149
152
run : |
150
- hugo mod get -v "$THEME_MODULE@v $THEME_VERSION"
153
+ hugo mod get -v "$THEME_MODULE@$THEME_VERSION"
151
154
hugo --gc -e production --baseURL="https://${DEPLOYMENT_DOMAIN}${PREVIEW_URL_PATH}/${PR_NUMBER}"
152
155
153
156
- name : Build Hugo for environment
154
157
working-directory : ${{inputs.docs_build_path}}
155
158
if : inputs.doc_type == 'hugo' && env.DEPLOYMENT_ENV != 'preview'
156
159
run : |
157
- hugo mod get "$THEME_MODULE@v $THEME_VERSION"
160
+ hugo mod get "$THEME_MODULE@$THEME_VERSION"
158
161
hugo --gc -e production --baseURL="https://${DEPLOYMENT_DOMAIN}${PRODUCTION_URL_PATH}"
159
162
160
163
# ## Sphinx builds
0 commit comments