This repository contains the source code for my personal website, developed with Hugo and hosted on AWS using S3 and CloudFront. Deployment is automated via GitHub Actions.
- Hugo - Static site generator
- hugo-coder theme - Clean and minimalist theme for Hugo
- AWS S3 - Storage for static files
- AWS CloudFront - CDN for fast content delivery
- GitHub Actions - CI/CD for automatic deployment
The site is hosted on AWS with an S3 bucket serving static files and a CloudFront Distribution as a CDN to optimize global delivery.
Deployment is automatically triggered whenever there is a push to the main branch. GitHub Actions executes the following steps:
- Checkout the repository
- Setup Hugo
- Authenticate with AWS via OIDC
- Generate static files with Hugo
- Upload files to S3
- Invalidate the CloudFront cache to ensure changes are immediately reflected.
If you need to force a manual deployment, run the following commands:
hugo --minify
hugo deploy --maxDeletes -1 --invalidateCDN
aws cloudfront create-invalidation --distribution-id <id> --paths "/*"
Sensitive credentials and configurations are stored as GitHub secrets. The environment variables used in the deployment are:
AWS_S3_BUCKET
- Name of the S3 bucketCLOUDFRONT_DISTRIBUTION_ID
- CloudFront distribution IDROLE_ARN
- IAM Role for OIDC