Skip to content

Commit

Permalink
Fix deploy order (#49)
Browse files Browse the repository at this point in the history
* updating with an example of referencing cf templates

* clean up old button references

* adding sample templates

* removing example cf template file

* Revert "removing example cf template file"

This reverts commit 881e78e.

* better wording from @dalbhanj

* deploy templates with npm command so they exist for testing

* fix syntax
  • Loading branch information
brentley committed Oct 14, 2018
1 parent 8e12fa0 commit d65823a
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
2 changes: 0 additions & 2 deletions codebuild-deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,10 @@ PRIMARY_BUCKET=$(echo $PRIMARY_BUCKET | cut -f1,2 -d.)
if [ "$CODEBUILD_GIT_CLEAN_BRANCH" = "master" ] ; then
aws s3 sync public/ s3://${PRIMARY_BUCKET}/ --cache-control 'max-age=3600, public' --exclude '*' --include '*.html' --include '*.xml';
aws s3 sync public/ s3://${PRIMARY_BUCKET}/ --cache-control 'max-age=86400, public' --exclude '*.html' --exclude '*.xml';
aws s3 sync templates/ s3://${TEMPLATE_BUCKET}/${CODEBUILD_GIT_CLEAN_BRANCH}/ --delete --cache-control 'max-age=86400, public' --acl public-read;
aws cloudfront create-invalidation --distribution-id ${CLOUDFRONT} --paths /\*
else
export DEPLOY_DIR=${CODEBUILD_GIT_CLEAN_BRANCH};
aws s3 sync public/ s3://${PRIMARY_BUCKET}/${DEPLOY_DIR}/ --delete --cache-control 'max-age=3600, public' --exclude '*' --include '*.html' --include '*.xml';
aws s3 sync public/ s3://${PRIMARY_BUCKET}/${DEPLOY_DIR}/ --delete --cache-control 'max-age=86400, public' --exclude '*.html' --exclude '*.xml';
aws s3 sync templates/ s3://${TEMPLATE_BUCKET}/${CODEBUILD_GIT_CLEAN_BRANCH}/ --delete --cache-control 'max-age=86400, public' --acl public-read;
aws cloudfront create-invalidation --distribution-id ${CLOUDFRONT} --paths /${DEPLOY_DIR}\*
fi
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
"test": "docker run -v $PWD/public/:/public 18fgsa/html-proofer /public --empty-alt-ignore --allow-hash-href",
"deploy": "aws s3 sync public/ s3://us-east-1-eksworkshop.com/ --delete",
"deploycontent": "aws s3 sync public/ s3://us-east-1-eksworkshop.com/ --delete --cache-control \"max-age=3600, public\" --exclude \"*\" --include \"*.html\" --include \"*.xml\"",
"deploytemplates": "aws s3 sync templates/ s3://${TEMPLATE_BUCKET}/${CODEBUILD_GIT_CLEAN_BRANCH}/ --delete --acl public-read --cache-control \"max-age=86400, public\"",
"deployothers": "aws s3 sync public/ s3://us-east-1-eksworkshop.com/ --delete --cache-control \"max-age=86400, public\" --exclude \"*.html\" --exclude \"*.xml\""
},
"dependencies": {
Expand Down

0 comments on commit d65823a

Please sign in to comment.