Automated deployment with CircleCI

I wrote up a little tutorial that shows how to set up a Hugo site with GitHub and CircleCI. In this particular instance, I’m deploying to Aerobatic, but of course, you could deploy anywhere. Here’s what my circle.yml file looks like.

dependencies:
  pre:
    - wget https://github.com/spf13/hugo/releases/download/v0.18/hugo_0.18-64bit.deb
    - sudo dpkg -i hugo*.deb
    - npm install -g aerobatic-cli

deployment:
  master:
    branch: master
    commands:
      - git clone https://github.com/rakuishi/hugo-zen.git themes/hugo-zen
      - hugo --theme=hugo-zen --baseURL https://__baseurl__ --buildDrafts
      - aero deploy -d public

And, in case you’re interested, here’s the complete blog post.

Feel free to add your tutorial(s) to the press section in the docs.

Thanks for the suggestion. Will do!

We’ve also posted them on our Hugo page: https://www.thenewdynamic.org/tool/hugo/

I’m a Developer Evangelist over at CircleCI, so props for this post. :wink:

My personal site is built with Hugo and I do something similar, but using a script and an environment variable: https://github.com/felicianotech/feliciano.tech/blob/master/circle.yml

I’m happy to see other Hugo users using CircleCI. Great combo.