You can configure things to let you write blog posts directly on Github's interface and use Travis CI to deploy your changes. Most day-to-day blogging will not require using Haskell at all or even having the Haskell environment installed on the blogger's machine.
I'll show you how to set everything up, including an optimized Travis config that can deploy changes in less than a minute. There is some existing information online about doing this sort of thing, but it's all outdated in one way or another.
We'll be using Github Pages to serve the final assets. I'll assume you're making a static site for a Github organization called myorg and want it to live at myorg.io.
- Create a Github organization. E.g. myorg
- Create a project myorg/myorg.github.io
- The master branch will be repeatedly overwritten and committed later on by Travis, so you won't make any edits there directly. For now add a file to the root of the master branch called CNAME containing the string myorg.io
- Create two A records in the DNS for myorg.io pointing at 22.214.171.124 and 126.96.36.199 respectively.
- Generate the base Hakyll project.
- Create an orphan source branch in your git repo and copy the generated files there.
- You (and Travis) will use cabal to run the site builder, so create a myorg.cabal:
- Reuse the cabal sandbox you created earlier:
- Keep build artifacts out of git by adding these lines to .gitignore
- Run your new site locally to see that it works!
- Create .travis.yml and add the following boilerplate:
- Generate a Github auth token.
- Set encrypted environment variables to allow Travis to commit to the master branch
- Commit all the files.
- Enable Travis for your repo. Instructions here.
- Push the source branch to Github.
- Watch the deploy progress at https://travis-ci.org/myorg/myorg.github.io