diff --git a/netlify.toml b/netlify.toml index e2ef888d1c..67673b1c72 100644 --- a/netlify.toml +++ b/netlify.toml @@ -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" @@ -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" @@ -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"