mirror of
https://github.com/rmaake1/httpstatuses.git
synced 2024-10-02 22:27:21 +02:00
Adds CloudFront invalidation on deploy
This commit is contained in:
parent
62df9e637c
commit
f4cc5fd142
11
deploy.sh
11
deploy.sh
@ -1,7 +1,14 @@
|
||||
build="build-${CIRCLE_BUILD_NUM}"
|
||||
echo "Preparing ${build}"
|
||||
sudo mkdir ~/${build}
|
||||
sudo cp -R ~/httpstatuses/build/. ~/${build}
|
||||
|
||||
echo "Deploying ${build} to ${DEPLOY_TARGET}"
|
||||
rsync -r -l ~/${build} ${DEPLOY_TARGET}:/srv/www/httpstatuses.com
|
||||
ssh ${DEPLOY_TARGET} "ln -sfn /srv/www/httpstatuses.com/${build} /srv/www/httpstatuses.com/live"
|
||||
rsync -r -l ~/${build} ${DEPLOY_TARGET}:${MY_DIRECTORY}
|
||||
ssh ${DEPLOY_TARGET} "ln -sfn ${MY_DIRECTORY}/${build} ${MY_DIRECTORY}/live"
|
||||
echo "Build deployed and pushed live"
|
||||
|
||||
echo "Creating CloudFront invalidation"
|
||||
aws configure set preview.cloudfront true
|
||||
aws cloudfront create-invalidation --distribution-id ${DISTRIBUTION_ID} --paths "/*"
|
||||
echo "CloudFront invalidation submitted, invalidation will take up to 15 minutes"
|
||||
|
Loading…
Reference in New Issue
Block a user