Skip to content

Commit

Permalink
Merge pull request #3278 from Akarshit/bugfix-CI
Browse files Browse the repository at this point in the history
Checking for AWS setting before deploying
  • Loading branch information
spencern authored Nov 29, 2017
2 parents 06e94e0 + 3aca40a commit d93edbe
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,12 @@ jobs:
name: Deploy to S3 if tests pass and branch is Master
command: |
if [ "${CIRCLE_BRANCH}" == "master" ]; then
aws s3 sync /tmp/reaction-docs ${API_DOC_BUCKET} --delete --region ${API_DOC_BUCKET_REGION}
if [[ "${API_DOC_BUCKET}" && "${API_DOC_BUCKET_REGION}" ]]; then
aws s3 sync /tmp/reaction-docs ${API_DOC_BUCKET} --delete --region ${API_DOC_BUCKET_REGION}
else
echo "S3 bucket configuration not found for jsdocs"
echo "Set API_DOC_BUCKET and API_DOC_BUCKET_REGION to build and deploy jsdocs to S3"
fi
else
echo "Not master branch so not deploying"
fi
Expand Down

0 comments on commit d93edbe

Please sign in to comment.