Skip to content

Commit a733e84

Browse files
committed
Add override for hugo theme
1 parent 367b5a1 commit a733e84

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

.github/workflows/docs-build-push.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,10 @@ on:
3434
type: string
3535
description: "Type of source docs. Currently supports 'hugo' and 'sphinx'"
3636
default: hugo
37+
force_hugo_theme_version:
38+
type: string
39+
description: "Overrides default of latest hugo theme. Useful for testing pre-release versions. Must start with 'v' before version."
40+
default: ""
3741

3842
env:
3943
GO_VERISON: "1.21" # Go version used for `hugo mod get`
@@ -78,6 +82,7 @@ jobs:
7882
DOCS_SOURCE_PATH: ${{inputs.docs_source_path}}
7983
EVENT_ACTION: ${{github.event.action}}
8084
DEPLOYMENT_ENV: ${{inputs.environment}}
85+
THEME_VERSION: ${{inputs.force_hugo_theme_version}}
8186

8287
concurrency:
8388
group: ${{ github.workflow }}-${{ github.ref }}
@@ -149,7 +154,7 @@ jobs:
149154
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.7.1
150155

151156
- name: Get latest hugo theme
152-
if: inputs.doc_type == 'hugo'
157+
if: inputs.doc_type == 'hugo' && inputs.force_hugo_theme_version == ''
153158
run: echo "THEME_VERSION=$(curl -s https://api.github.com/repos/nginxinc/nginx-hugo-theme/releases/latest | jq -r ".tag_name")" >> "$GITHUB_ENV"
154159

155160
### Hugo builds

0 commit comments

Comments
 (0)