Skip to content

Commit 5fb2979

Browse files
authored
fix CI build (#6480)
1 parent 9a3b171 commit 5fb2979

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

hack/build.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,16 +40,16 @@ readonly TEMP="$(mktemp -d)"
4040
readonly SITE=$PWD/site
4141
rm -rf site/
4242

43-
if [[ -z "${GITHUB_TOKEN}" ]]; then
44-
echo "❌ Error: GITHUB_TOKEN environment variable is not set." >&2
45-
exit 1
46-
fi
4743

4844
REMOTE_BRANCH=$(git remote | grep -q upstream && echo upstream || echo origin)
4945

5046
# If we're running on Netlify, update git branches
5147
if [ "$CI" == "true" ]; then
5248
git fetch --prune $REMOTE_BRANCH
49+
elif [[ -z "${GITHUB_TOKEN}" ]]; then
50+
# Don't require GITHUB_TOKEN in CI since netlify prunes it
51+
echo "❌ Error: GITHUB_TOKEN environment variable is not set." >&2
52+
exit 1
5353
fi
5454

5555
if [[ "$OSTYPE" == "darwin"* ]]; then

0 commit comments

Comments
 (0)