Automating deployments

It’s not a good idea to repeat the quick start process every time you want to update your site. So let’s automate it!

Create your repository

First, create a repository on or named after your website (e.g. “”), and push your website’s source code to it.

Unfamiliar with git or hg? Check out the tutorial.

Writing the build manifest

We’ll be using to automate building and deploying our site. Create a file named “.build.yml” and fill it in with this template:

image: alpine/edge
- hut
- package: |
    cd $site
    tar -cvz . > ../site.tar.gz
- upload: |
    hut pages publish -d $site site.tar.gz
hut is a CLI tool to interact with the APIs. It uses an OAuth 2.0 token generated on-the-fly with the permissions requested by the "oauth" directive - in this case, only enough to deploy your site.

Update the site variable to your desired website (e.g. “”). You can also add additional steps under tasks and package to call a static site generator and bundle your website differently. Once you’re done, commit this file to your repository and push. A URL will be printed to your console which you can click on to follow the progress on deploying your site. Once it’s done, that’s it - your site will be re-published every time you push.

Not sure how to build your static site with a build manifest? We have some examples for common static site generators available in the example pages repository.

For more information about using, consult the documentation.