Re: Automagic

I recently moved my git repos to an instance of `gitlab`__, at the same time I figured I would try to start using its built-in `CI`__ tool to build and publish my blog. Now when code is checked into the main repo it is built, tested, and deployed. I don’t have to remember to setup a second repo on each server or push to it. Thanks to docker (Yes, I know), I can build it in a sandbox and tear it down when I am down.

Here is my `.gitlab-ci.yml`__ file as an example.

image: zoglesby/hakyll-image:v3

      - cabal update
      - cabal install blog.cabal

      type: deploy
        - blog build
        - blog deploy

That code uses a docker image I have setup with `haskell`__ and `hakyll`__, updates cabal and installs my `cabal`__ package. Then it build the blog and deploys it. The first few times I ran this I did not have hakyll in the prebuilt docker image and it was taking 20 minutes or so to build, now it runs in less than a minute.