Skip to content

Commit

Permalink
add same variable to prod build cmd
Browse files Browse the repository at this point in the history
Signed-off-by: Moritz Wiesinger <[email protected]>
  • Loading branch information
mowies committed Jun 20, 2023
1 parent f40b947 commit 396ba18
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions netlify.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
[build]
base = "docs/"
publish = "public/"

# On netlify our branch will always be the one we are currently building for
# important information regarding naming
# https://gohugo.io/getting-started/configuration/#configure-with-environment-variables
command = "HUGOxPARAMSxGITHUB_BRANCH=$BRANCH hugo -b $DEPLOY_PRIME_URL"
ignore = "git diff --quiet $CACHED_COMMIT_REF $COMMIT_REF . ../netlify.toml"

Expand All @@ -10,11 +14,6 @@ ignore = "git diff --quiet $CACHED_COMMIT_REF $COMMIT_REF . ../netlify.toml"
HUGO_VERSION = "0.111.3"
HUGO_ENABLEGITINFO = "true"

# On netlify our branch will always be the one we are currently building for
# important information regarding naming
# https://gohugo.io/getting-started/configuration/#configure-with-environment-variables
HUGOxPARAMSxGITHUB_BRANCH="$BRANCH"

[context.deploy-preview.environment]
HUGO_ENV = "development"

Expand All @@ -25,4 +24,7 @@ HUGO_ENV = "staging"
HUGO_ENV = "production"

[context.production]
command = "hugo -b $URL"
# On netlify our branch will always be the one we are currently building for
# important information regarding naming
# https://gohugo.io/getting-started/configuration/#configure-with-environment-variables
command = "HUGOxPARAMSxGITHUB_BRANCH=$BRANCH hugo -b $URL"

0 comments on commit 396ba18

Please sign in to comment.