Guidance on cicd with this construct
mbonig opened this issue · 1 comments
As I read it: this will deploy the local files to an s3 bucket and all the fixings, but only once. If you make changes to the site, you'd need to redeploy the stack. This is not a cicd, just a one-time deploy.
Now, let's say I want to automate this. I would setup a new codepipeline whose second step is to both rebuild the distribution files of the spa (e.g. npm run build:prod) and resynth the stack (e.g. cdk synth/deploy). Is this the route you had envisioned?
You can do ci/cd with codebuild cdkpatterns.com has an example of the buildspec used - https://github.com/cdk-patterns/serverless/blob/master/s3-angular-website/buildspec.yml essentially yes though, rebuild the website and then redeploy the stack and let cdk work out the diff.