Skip to content

Commit a3d27e4

Browse files
authored
Get HUGO_ENVIRONMENT from GitHub repo defined variable (#306)
If HUGO_ENVIRONMENT is defined as a GitHub repository variable use it, if not default to staging. This change allows me to move from production to staging without having to edit gh-pages.yml.
1 parent e0a39dc commit a3d27e4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

.github/workflows/gh-pages.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ defaults:
4343
env:
4444
# ----------------------------------------------------------------------------
4545
# Specify the deployment environment: staging or production
46-
HUGO_ENVIRONMENT: production
46+
HUGO_ENVIRONMENT: ${{ vars.HUGO_ENVIRONMENT || 'staging' }}
4747
HUGO_VERSION: 0.144.2
4848

4949
jobs:

0 commit comments

Comments
 (0)