diff --git a/bin/deploy.sh b/bin/deploy.sh index e5ed608..107b2a3 100755 --- a/bin/deploy.sh +++ b/bin/deploy.sh @@ -2,12 +2,14 @@ # Don't deploy if commit contains WIP set -e if [[ "$TRAVIS_PULL_REQUEST" != "false" ]]; then - if [[ $(git log -1 --pretty=%B --no-merges) != *"WIP"* ]]; then - NOW_URL=$(now -e NODE_ENV=production --public --no-clipboard --team=dawn --token="$NOW_TOKEN") + if [[ -z ${NOW_TOKEN+x} ]]; then + if [[ $(git log -1 --pretty=%B --no-merges) != *"WIP"* ]]; then + NOW_URL=$(now -e NODE_ENV=production --public --no-clipboard --team=dawn --token="$NOW_TOKEN") - curl -X POST \ + curl -X POST \ -H 'Content-type: application/json' \ --data "{\"text\": \":small_red_triangle: New Carbon PR Deployment for \\n:rocket: $NOW_URL\"}" \ "$DAWN_SLACK_WEBHOOK" + fi fi fi