Built With sites

Hugo,, YAML

Hello world! Again. Now my blog is finally running in the cloud1!

This time I’m using the terrific SourceHut to automatically build, deploy and host my site, in addition to hosting my git repositories.

Update: I’ve updated this setup as of August 2022, currently hosting this blog on, but still using to build and deploy the site.

Setup #

The most important part of this - my .build.yml:

image: alpine/latest
  - hugo
  - f83f7c0c-e142-41d9-9d64-7175040ddc92
- package: |
    cd $site
    make update build package    
- upload: |
    cd $site
    acurl -f$site -Fcontent=@site.tar.gz    

And, the Makefile:

DST_DIR := public/

    @hugo --minify

    @git submodule init
    @git submodule update

    @tar -C $(DST_DIR) -cz . > site.tar.gz

    @rm -rf $(DST_DIR)

    -@hugo serve -FD

Two issues, one imagined #

I ran into one issue when setting this up. At first I thought it was a bug in the implementation, but later I realized that I just hadn’t read the documentation, and that the builds were failing as the build service wasn’t allowed to check out my private repository.

Here’s the helpful error message:

[#460340] 2021/03/15 20:06:21 Failed to clone repository. If this a private repository, make sure you've added a suitable SSH key.
[#460340] 2021/03/15 20:06:21
[#460340] 2021/03/15 20:06:22 Build failed.

So I read the linked documentation, added an unique ssh-ed25519 public key to my profile, and the ssh secret key as a build secret, and included the secret identifier to my .build.yml.

But it seems that only rsa keys are supported with this build service - I was getting invalid format error messages with my ssh-ed25519 keys. I redid the steps above with a rsa key and it worked without issues - maybe this is a limitation in the default Alpine sshd?

[#460340] 2021/03/15 20:06:21 Cloning repositories
Cloning into ''...
Warning: Permanently added ',' (ECDSA) to the list of known hosts.
Load key "/home/build/.ssh/id_rsa": invalid format Permission denied (publickey,keyboard-interactive).
fatal: Could not read from remote repository.

Conclusion #

It’s working now, and will keep on working long after I get tired of this blog, or foul up in some new way that will lead to the loss of my repositories.

  1. On someone elses computer, that is. ↩︎