Skip to content

Commit a929a41

Browse files
committed
better deploy script
1 parent 2de10a6 commit a929a41

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

.circleci/config.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,13 @@ jobs:
1818
- run:
1919
name: Deploy
2020
command: >
21-
if [ $CIRCLE_BRANCH = 'master' ]; then aws s3 sync dist s3://fullstackbulletin.com && aws configure set preview.cloudfront true && aws cloudfront create-invalidation --distribution-id $CLOUDFRONT_DISTRIBUTION_ID --invalidation-batch "{ \"Paths\": { \"Quantity\": 1, \"Items\": [ \"/*\" ] }, \"CallerReference\": \"CIRCLE-CI-BUILD-$CIRCLE_BUILD_NUM-$CIRCLE_SHA1\" }"; fi
21+
if [ $CIRCLE_BRANCH = 'master' ]
22+
then
23+
export AWS_DEFAULT_REGION=eu-west-1
24+
aws s3 sync dist s3://fullstackbulletin.com;
25+
aws configure set preview.cloudfront true;
26+
aws cloudfront create-invalidation --distribution-id $CLOUDFRONT_DISTRIBUTION_ID --invalidation-batch "{ \"Paths\": { \"Quantity\": 1, \"Items\": [ \"/*\" ] }, \"CallerReference\": \"CIRCLE-CI-BUILD-$CIRCLE_BUILD_NUM-$CIRCLE_SHA1\" }"
27+
fi
2228
2329
workflows:
2430
build:

0 commit comments

Comments
 (0)