Hacker News new | ask | show | jobs
by orisho 2213 days ago
GitHub pages / GitLab pages. I prefer the latter since the CI for pages is less magical and more flexible as a result - you aren't limited to what they support, and they don't claim a 100GB* traffic limit (just fair use). Couple with a cheap .com and free Cloudflare for DNS and caching.

* Corrected mistake, was 10GB

3 comments

This is my entire CI yaml, which copies static HTML and other files (I don't use any static site generator, just plain HTML & CSS) and flushes the Cloudflare cache:

  stages:
    - deploy
    - clear-cache
  pages:
    stage: deploy
    script:
      - mkdir .public
      - cp -r * .public
      - mv .public public
    artifacts:
      paths:
        - public
    only:
      - master

  clear-cache:
    stage: clear-cache
    script:
     - curl -X DELETE "https://api.cloudflare.com/client/v4/zones/$CF_ZONE_ID/purge_cache" -H "X-Auth-Key:$CF_AUTH_KEY" -H "X-Auth-Email:$CF_AUTH_EMAIL" -H "Content-Type:application/json" --data '{"purge_everything":true}'
    only:
     - master
Yes.

I followed the tutorial at [0] and had my site [1] running in an afternoon, as promised in the tutorial. The slowest thing was figuring out how to get my (paid-for) custom domain to point at GitHub (although a custom domain isn't essential to get your site running). I've had my site active since May 2018 with essentially zero hassle.

Pleasingly, you don't need to know anything about the version control aspects of Git to publish a site or add new blog pages and then edit them.

>> Must haves: Be able to display a message on the landing page Nice to haves: A Folder to keep articles

Yes to both of your must haves

[0] http://jmcglone.com/guides/github-pages/

[1] https://www.non-kinetic-effects.co.uk/

GitHub pages soft bandwidth limit is 100GB/mo (https://help.github.com/en/github/working-with-github-pages/...)