We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c34c523 commit 9c59fabCopy full SHA for 9c59fab
.github/workflows/docs-build-push.yml
@@ -195,6 +195,20 @@ jobs:
195
hugo-version: ${{env.HUGO_VERSION}}
196
extended: true
197
198
+ - name: Add hugo build info
199
+ if: inputs.doc_type == 'hugo'
200
+ run: |
201
+ timestamp=$(date -u +'%Y-%m-%dT%H:%M:%SZ')
202
+ cat <<EOF > buildInfo.json
203
+ {
204
+ "nginxHugoThemeVersion": "$THEME_MODULE@$THEME_VERSION",
205
+ "buildDate": "$timestamp"
206
+ }
207
+ EOF
208
+ mkdir -p ${{inputs.docs_build_path}}/static/
209
+ cp buildInfo.json ${{inputs.docs_build_path}}/static/
210
+
211
212
- name: Build Hugo for PR preview
213
if: inputs.doc_type == 'hugo' && (github.event.action == 'synchronize' || github.event.action == 'opened' || env.DEPLOYMENT_ENV == 'preview')
214
working-directory: ${{inputs.docs_build_path}}
0 commit comments