Automatically build, deploy, and host Hugo sites in Bitbucket

With the Aerobatic add-on for Bitbucket, you can now host your Hugo site on Bitbucket. And, just like GitHub Pages does with Jekyll, the build is handled automatically in Bitbucket without the need for additional CI tools.

To do so, you just declare a snippet in your package.json like so:

  "_aerobatic": {
    "build": {
      "engine": "hugo",
      "themeRepo": ""

Then, git push, and your Hugo site will be automatically built, deployed, and hosted all from within Bitbucket / Aerobatic. No need to build locally and push your /public folder to Bitbucket anymore. Now you can just edit markdown directly in Bitbucket, commit your changes, and a new version of your site will be deployed.

More details can be found in this blog post and in the documentation. Also, there is now a tutorial in the Hugo docs.