I am trying to write cdk pipeline to setup s3 website whenever I commit to my github. I was able to setup the static website using CDK. however I am not sure how to progress with cdk pipeline to copy github repo contents to s3 bucket whenever there is a commit.
I was wondering if anyone can provide some guidance on the following
- 
How to setup "Start the pipeline on source code change"
 
- 
How to deploy (copy) the repo contents to S3 bucket
 
    import * as cdk from "aws-cdk-lib";
    import * as codecommit from "aws-cdk-lib/aws-codecommit";
    import * as pipelines from "aws-cdk-lib/pipelines";
    import { CodePipeline, CodePipelineSource } from "aws-cdk-lib/pipelines";
    
    import { Construct } from "constructs";
    
    export class WorkshopPipeLineStack extends cdk.Stack {
      constructor(scope: Construct, id: string, props?: cdk.StackProps) {
        super(scope, id, props);
    
        const source = pipelines.CodePipelineSource.gitHub(
          "kasukur/s3-website",
          "main"
        );
    
        const pipeline = new pipelines.CodePipeline(scope, "MyPipeline", {
          synth: new pipelines.ShellStep("Synth", {
            input: source,
            commands: [],
            env: {
              COMMIT_ID: source.sourceAttribute("CommitId"),
            },
          }),
        });
      }
    }