GitHub-actions for hugo deployments
Overview
How I setup github-actions to deploy my site to s3 on commit to main. I was already using hugo, hosted on S3 with route53, cloudfront and https. This post is specific to automated deployments.
References
High-level details
- added aws secrets to github
- setup new limited access in AWS
- added new IAM user "githubcicd" and using access keys on this user
- added new IAM policy "GitHubActionsPolicy", limited access to s3,cloudfront
- added deployment config in config.toml
- name
- s3 url
- cloudFrontDistributionID
- added resources required to build in github
- assets/scss
- resources/_gen/assets/sass
- added file to automate deployment
- .github/workflows/main.yaml