diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index fce752ca28..61b4cb921c 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -132,8 +132,13 @@ jobs: STATUS=$(echo -n "$RES" | jq -r '.status') SHA=$(echo -n "$RES" | jq -r '.meta.githubCommitSha') + if [ -z "$SHA" ] || [ -z "$STATUS" ]; then + echo -e "\nError the JSON response is missing expected fields:\n\n$RES\n" + exit 5 + fi + if [ "$SHA" == '${{ env.COMMIT_SHA }}' ] && [ "$STATUS" == 'READY' ]; then - exit + exit 0 fi echo -e '\nWait for the Storybook deployment...\n\n'