rupertbg / aws-continuously-delivered-static-site

Click-to-deploy your static site via AWS CloudFormation and AWS CodePipeline

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Example: Continuously Delivered Static Site on AWS

This example repo deploys a HostedZone via domain.yml and a Pipeline via pipeline.yml. The Pipeline deploys itself, infra.yml and a folder called src into a non-public S3 Bucket. infra.yml contains a CloudFront Distribution mapped to the S3 Bucket, and the associated RecordSets and Certificate.

Usage

You can use the included HostedZone template to spin up the DNS for your domain if you haven't done this already. If you already have a HostedZoneId you can use, skip this step.

  1. [Optional] Deploy domain.yml via CloudFormation to create a HostedZone for your domain.
  2. Generate a Personal Access Token for Github and store it in Secrets Manager.
  3. Deploy pipeline.yml via CloudFormation.
  4. Go to CodePipeline to watch your site deploy itself.
  5. During the Cloudfront deployment step an ACM Certificate will be created. Check the ACM Console during this step to validate the certificate. You only need to do this once unless you make changes to the domain or certificate in the Cloudformation templates.

About

Click-to-deploy your static site via AWS CloudFormation and AWS CodePipeline