File tree Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -195,6 +195,20 @@ jobs:
195
195
hugo-version : ${{env.HUGO_VERSION}}
196
196
extended : true
197
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
+
198
212
- name : Build Hugo for PR preview
199
213
if : inputs.doc_type == 'hugo' && (github.event.action == 'synchronize' || github.event.action == 'opened' || env.DEPLOYMENT_ENV == 'preview')
200
214
working-directory : ${{inputs.docs_build_path}}
You can’t perform that action at this time.
0 commit comments