Last active
December 5, 2019 03:56
-
-
Save jimmdd/960e9a57712b9f7b6c998652ad1d3f15 to your computer and use it in GitHub Desktop.
build spec for aws codebuild
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: 0.2 | |
phases: | |
install: | |
runtime-versions: | |
nodejs: 10 | |
commands: | |
- npm install serverless -g | |
build: | |
commands: | |
- npm install | |
- | | |
if expr "${CLOUDFRONTID}" : "DEFAULT" >/dev/null; then | |
serverless; | |
aws s3 sync ./.serverless s3://${YOUR S3 BUCKET}/.serverless; | |
else | |
aws s3 sync s3://${YOUR S3 BUCKET}/.serverless ./.serverless; | |
serverless; | |
aws cloudfront create-invalidation --distribution-id ${CLOUDFRONTID} --paths '/*'; | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment