This is the source for my personal website at https://parsiya.net.
- Create a new post with
hugo new post/2018-11-23-post-name/index.markdown(or
- Edit the post and proofread. Pictures are in the same directory to take advantage of page bundles.
ctrl+shift+bin VS Code starts a task that runs the Hugo watch server and opens it in a browser. See .vscode/tasks.json.
- Push to GitHub.
- GitHub action takes over and builds the site and deploys it to GitHub pages.
- See the "Deploying" section below for more information.
s3deploy uploads the results to AWS.
- Profit. The website is now updated. Add CI/CD to your resume.
The website is hosted in an AWS S3 bucket. CloudFront provides CDN and TLS (and certificate). GitHub pages are also popular (and free). See my blog post Automagically Deploying Websites with Custom Domains to GitHub Pages.
I use a custom GitHub action. See deploy.yml.
s3deploy - Not Used Anymore
Static resources (fonts, images, css, etc.) do not have expiration dates. Everything else uses gzip compression. When a resource is updated, s3deploy invalidates its CloudFront cache.
gzip compression for Keybase proofs (see
static/keybase.txt) breaks them.
Use the s3deploy's example IAM policy. At the time of writing, AWS does not support addressing separate CloudFront distributions with ARNs (Amazon Resource Names) so the resulting key can list and invalidate all distributions.
Travis CI - Not Used Anymore
The blog used to use Travis CI. See @archive/.travis.yml.
- The theme is a submodule. It's updated first.
- Install two debs. Hugo and s3deploy. I like to control the versions as both software are under heavy development.
language:minimalreduces build time by 20 seconds (compared to the default container).
- AWS key and secret are in
AWS_SECRET_ACCESS_KEYenvironment variables respectively. These are used by s3deploy.
See @archive/deploy.bat for manual deployment.