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:
195195 hugo-version : ${{env.HUGO_VERSION}}
196196 extended : true
197197
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 > build.json
203+ {
204+ "nginxHugoThemeVersion": "$THEME_MODULE@$THEME_VERSION",
205+ "buildDate": "$timestamp"
206+ }
207+ EOF
208+ mkdir -p ${{inputs.docs_build_path}}/static/
209+ cp build.json ${{inputs.docs_build_path}}/static/
210+
211+
198212 - name : Build Hugo for PR preview
199213 if : inputs.doc_type == 'hugo' && (github.event.action == 'synchronize' || github.event.action == 'opened' || env.DEPLOYMENT_ENV == 'preview')
200214 working-directory : ${{inputs.docs_build_path}}
You can’t perform that action at this time.
0 commit comments