I'd like to automate deploying our site to AWS S3. I've written a node script to automate building and uploading the site, but I'd like to have the script automatically run whenever the master
branch of our repo is updated on github.
I looked into AWS CodeDeploy, but it looks like that's for specifically deploying to EC2. I've also looked at AWS Lambda, but there doesn't seem to be a clear way to pull a copy of the repo using git
so I can run the script.
Any services (preferably tied to AWS) that I can use?
If you are using TravisCI, the deployment is pretty straight forward. The only part you will need to add to your
.travis.yml
is :My blog post explains all the details for the AWS side (user setup, IAM and S3 bucket configurations) as well as the github and travisCI side.
Perhaps overpowered for your simple use case, but you could create a very simple CodePipeline to push your github repository to S3.