AWS Codepipeline supports deploying to S3.
I have an Angular SPA that I'm deploying to S3 as a static website (using Cloudfront, etc)
When I do the ng build --prod
command, I include outputHashing
, which will change the file names deployed over time.
However when deploying to S3 in my Codepipeline, it's not removing old js/css files with different hashes, but continually adding new files
I'd like to use Codepipeline to deploy to S3 with the same behavior as
aws s3 sync ./dist s3://mywebsite-bucket.com/ --acl public-read --delete
Note the --delete
flag.
Is this possible to set up in Codepipeline when deploying to S3?