You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Use $URL not $DEPLOY_PRIME_URL for prod deploys (#1265)
$DEPLOY_PRIME_URL appears to point at a .netlify.app version of the
site, rather than the URL it's actually getting deployed as for prod
deploys. But is needed for preview deploys.
Copy file name to clipboardExpand all lines: tooling/common-config/deploy-netlify.sh
+6-1Lines changed: 6 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -4,5 +4,10 @@ set -euo pipefail
4
4
5
5
npm install --legacy-peer-deps
6
6
7
+
URL_TO_USE="${URL}"
8
+
if [[ "${PULL_REQUEST}"=="true" ]];then
9
+
URL_TO_USE="${DEPLOY_PRIME_URL}"
10
+
fi
11
+
7
12
# We set --baseURL on netlify so that any references to .Permalink end up pointing at deploy preview pages, rather than being hard-coded to point at the production URLs.
8
-
hugo --minify --environment production --baseURL $DEPLOY_PRIME_URL&& npx pagefind --site "public"
13
+
hugo --minify --environment production --baseURL "${URL_TO_USE}"&& npx pagefind --site "public"
0 commit comments