diff --git a/netlify/deploy-main.sh b/netlify/deploy-main.sh index 1cbc3b697..a48466c7d 100644 --- a/netlify/deploy-main.sh +++ b/netlify/deploy-main.sh @@ -6,6 +6,12 @@ json=$(yarn netlify deploy --build --prod --json --message "${1:0:8}: $2") +if [ $? -ne 0 ]; then + echo "Error while executing netlify! Will try again without json..." + yarn netlify deploy --build --prod --message "${1:0:8}: $2" + exit 1 +fi + echo "${json}" url=$(echo "${json}" | jq -r .deploy_url) diff --git a/netlify/deploy-pr.sh b/netlify/deploy-pr.sh index fe884b9cf..f71ed67a0 100755 --- a/netlify/deploy-pr.sh +++ b/netlify/deploy-pr.sh @@ -6,6 +6,12 @@ json=$(yarn netlify deploy --build --context deploy-preview --alias "$1" --json --message "[#$1] $2") +if [ $? -ne 0 ]; then + echo "Error while executing netlify! Will try again without json..." + yarn netlify deploy --build --context deploy-preview --alias "$1" --message "[#$1] $2" + exit 1 +fi + echo "${json}" url=$(echo "${json}" | jq -r .deploy_url)