diff --git a/docs/Earthfile b/docs/Earthfile index 17986c9ff00..ebd913f0124 100644 --- a/docs/Earthfile +++ b/docs/Earthfile @@ -47,7 +47,7 @@ deploy-preview: COPY --dir ../yarn-project/+scripts-prod/usr/src/yarn-project /usr/src COPY ./netlify.toml . COPY ./deploy_preview.sh . - RUN NETLIFY_AUTH_TOKEN=$NETLIFY_AUTH_TOKEN NETLIFY_SITE_ID=$NETLIFY_SITE_ID ./deploy_preview.sh $PR $AZTEC_BOT_COMMENTER_GITHUB_TOKEN + RUN NETLIFY_AUTH_TOKEN=$NETLIFY_AUTH_TOKEN NETLIFY_SITE_ID=$NETLIFY_SITE_ID ./deploy_preview.sh "$PR" "$AZTEC_BOT_COMMENTER_GITHUB_TOKEN" deploy-prod: BUILD ../yarn-project/+scripts-prod diff --git a/docs/deploy_preview.sh b/docs/deploy_preview.sh index 74091495fd0..af544278342 100755 --- a/docs/deploy_preview.sh +++ b/docs/deploy_preview.sh @@ -26,4 +26,6 @@ DOCS_PREVIEW_URL=$(echo "$DEPLOY_OUTPUT" | grep -E "https://.*aztec-docs-dev.net echo "Unique deploy URL: $DOCS_PREVIEW_URL" cd ../yarn-project/scripts -AZTEC_BOT_COMMENTER_GITHUB_TOKEN=$AZTEC_BOT_COMMENTER_GITHUB_TOKEN PR_NUMBER=$PR_NUMBER DOCS_PREVIEW_URL=$DOCS_PREVIEW_URL yarn docs-preview-comment +if [ -n "$PR_NUMBER" ] ; then + AZTEC_BOT_COMMENTER_GITHUB_TOKEN=$AZTEC_BOT_COMMENTER_GITHUB_TOKEN PR_NUMBER=$PR_NUMBER DOCS_PREVIEW_URL=$DOCS_PREVIEW_URL yarn docs-preview-comment +fi