|
|
|
|
|
by tfolbrecht
3134 days ago
|
|
Cool! I could see why this would work well for teams and collaboration.
Here's my hugo+aws pipeline for my personal blog. Do editing, with hugo in server mode so I can WYSIWYG edit my pages. Then run a bash script: #!/bin/bash
# build site from markdown + template
hugo ~/sitedir/
# post to S3 bucket which is a file storage service
aws s3 sync ~/sitedir/public s3:sitedirbuckket --recursive
# invalidate CDN distribution so content delivery is nice and fresh!
aws cloudfront create-invalidation --distribution-id XXXXXXXXXX --paths /*
echo -e "All done"
|
|
I like the CodeBuild solution for the times when I'm editing on my phone or a shared computer. I push to GitHub, and CodeBuild handles:
* build (as above, plus asset processing and minification)
* deploy (s3 sync, plus some fiddling to add 301 redirects)
* ping search engines
I keep a lot of drafts and temporary notes in my local checkouts and doing build/deploy on a fresh checkout helps to ensure they don't slip onto the public website.