Before — manual
bash — kev-blog
$ npm ci --ignore-scripts $ npm run build $ aws s3 sync ./out s3://<MY_BUCKET> --delete $ aws cloudfront create-invalidation \ --distribution-id <MY_DIST_ID> --paths "/*" # type each one, hope nothing failed silently
deploy.sh git-aware
fail-fast
one entry point
After — automated
bash — kev-blog
$ ./deploy.sh ✓ on branch main ✓ aws sts get-caller-identity ✓ git pull --ff-only ✓ npm ci --ignore-scripts ✓ npm run build ✓ s3 sync ./out → <MY_BUCKET> ✓ cloudfront invalidation queued