Automatically deploy your GitHub-hosted Jekyll project on AWS with your own custom domain via S3, CloudFront, and Route53.
CI/CD is also included to automatically deploy when you push your Jekyll changes to GitHub.
Requires a GitHub Jekyll project, a GitHub personal access token, an AWS account, and a Route53-purchased domain.
Associated blog post can be found here.
The diagram above shows a non-exhaustive architecture overview (e.g. S3 log bucket, IAM Roles created in cloudformation.html
are not shown).
cloudformation.yml
.cloudformation.yml
.BuildSpec
parameter in the template so that NodeJS gets installed (see some of the blog posts in the Acknowledgements for an example of how this is done).repo
and admin:repo_hook
options selected for CodePipeline to access your repository (AWS Docs).cloudformation.yml
file in this project and fill in all of the required parameters. Once the template has been deployed successfully, CodeBuild will build and deploy your website automatically and you should see it hosted at the domain that you specified in your WebsiteURL
parameter in the CloudFormation stack. You will see your website changes automatically whenever you push changes to your GitHub Jekyll repository on the specified branch.There exist several blog posts online (see the Acknowlegements section below) that outline how to deploy a Jekyll website to AWS, but I wanted to codify the entire process into a single CloudFormation script so that I could better manage my own personal website. I also wanted to provide an easier out-of-the-box solution to anyone looking to host their Jekyll site on AWS.
In the course of building this CloudFormation template I referenced several blogs and AWS support pages, notably:
Thanks to the authors above without whom I don't think I could have done this project successfully.