Live data from Hacker News

Jekyll Static Web Hosting – Deployment Pipeline on AWS

zoph.me

11–20 of 67 posts

Re: Jekyll Static Web Hosting – Deployment Pipeline on AWS

#14
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"

Re: Jekyll Static Web Hosting – Deployment Pipeline on AWS

#15

Does anyone here have an objection to using github pages? You can just point your domain to your github repo and it’s HTTPS by default and from what I can tell fee to host on public repos. Maybe I’m unaware of potential issues for a static site?

Github Pages is missing a couple of features, namely:

* Build systems besides Jekyll

* HTTPS for custom domains

...but the second problem can easily be solved with Cloudflare and the first one can be solved with a git subtree push. Beyond this it's pretty fully featured.

Re: Jekyll Static Web Hosting – Deployment Pipeline on AWS

#16
post #2

After I discovered Netlify, I'm kind of thinking "why bother". It's free, I just push to my repo and they take care of all the building/publishing/hosting/CDNs, and they're very responsive for support and have high availability. I'm a very happy customer (or rather leech, as I don't pay anything).

We use Netlify and find there are quite often (every few weeks) outages and caching issues.

Ah, hmm, I haven't really noticed anything that wasn't detailed on their status page.

Re: Jekyll Static Web Hosting – Deployment Pipeline on AWS

#17

Does anyone here have an objection to using github pages? You can just point your domain to your github repo and it’s HTTPS by default and from what I can tell fee to host on public repos. Maybe I’m unaware of potential issues for a static site?

Github Pages is missing a couple of features, namely: * Build systems besides Jekyll * HTTPS for custom domains ...but the second problem can easily be solved with Cloudflare and the first one can be solved with a git subtree push. Beyond this it's pretty fully featured.

Standard disclaimer: Cloudflare only secures the communication between the visitor and Cloudflare's network, not between Cloudflare and GitHub Pages when using a custom domain and the 'Flexible SSL' feature Cloudflare provides which you are talking about.

So an attacker can still alter/intercept content between GitHub Pages and Cloudflare before it gets to the visitor.

To some, the illusion of security might be considered more harmful that knowing you have none at all.

For an alternative, GitLab Pages offers HTTPS on custom domains, provisioned by LetsEncrypt I believe.

Netlify does something similar.

Both alternatives also allow any build system you configure.

Re: Jekyll Static Web Hosting – Deployment Pipeline on AWS

#18

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 distributio…

This is almost line-for-line my setup.

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.

Re: Jekyll Static Web Hosting – Deployment Pipeline on AWS

#19

Earlier quoted context omitted.

Github Pages is missing a couple of features, namely: * Build systems besides Jekyll * HTTPS for custom domains ...but the second problem can easily be solved with Cloudflare and the first one can be solved with a git subtree push. Beyond this it's pretty fully featured.

Standard disclaimer: Cloudflare only secures the communication between the visitor and Cloudflare's network, not between Cloudflare and GitHub Pages when using a custom domain and the 'Flexible SSL' feature Cloudflare provides which you are talking about. So an attacker can still alter/intercept content between GitHub Pages and Cloudflare before it gets to the visitor. To some, the illusion of security might be consi…

I would like to know why GitHub doesn't do something similar to Netlify and GitLab. Surely it can't be that hard if some what smaller companies can already implement this?

Also, if using CloudFlare on a static site that collects no form data and only has links to external websites, would it matter so much, or is it just as important to remember about the potential harms?

Post reply on HN