We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9a3b171 commit 5fb2979Copy full SHA for 5fb2979
hack/build.sh
@@ -40,16 +40,16 @@ readonly TEMP="$(mktemp -d)"
40
readonly SITE=$PWD/site
41
rm -rf site/
42
43
-if [[ -z "${GITHUB_TOKEN}" ]]; then
44
- echo "❌ Error: GITHUB_TOKEN environment variable is not set." >&2
45
- exit 1
46
-fi
47
48
REMOTE_BRANCH=$(git remote | grep -q upstream && echo upstream || echo origin)
49
50
# If we're running on Netlify, update git branches
51
if [ "$CI" == "true" ]; then
52
git fetch --prune $REMOTE_BRANCH
+elif [[ -z "${GITHUB_TOKEN}" ]]; then
+ # Don't require GITHUB_TOKEN in CI since netlify prunes it
+ echo "❌ Error: GITHUB_TOKEN environment variable is not set." >&2
+ exit 1
53
fi
54
55
if [[ "$OSTYPE" == "darwin"* ]]; then
0 commit comments