Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions hack/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -40,16 +40,16 @@ readonly TEMP="$(mktemp -d)"
readonly SITE=$PWD/site
rm -rf site/

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

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

# If we're running on Netlify, update git branches
if [ "$CI" == "true" ]; then
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
fi

if [[ "$OSTYPE" == "darwin"* ]]; then
Expand Down
Loading