Build an Hugo website with Bitbucket Pipelines
I now use (bitbucket pipelines) to publish this website.
In order to use bitbucket pipelines, it was really easy. Just create a file bitbucket-pipelines.yml
:
pipelines:
default:
- step:
script:
- wget https://github.com/spf13/hugo/releases/download/v0.20.6/hugo_0.20.6_Linux-64bit.deb
- dpkg -i hugo*.deb
- hugo -b "https://www.slurdge.org/" -d public
- rsync -avz --exclude "*.htaccess" --exclude ".well-known" --delete public/ slurdge@slurdge.org:~/public_html/
And presto! Your website is automagically put up to date. And it’s fast! Around ~25 second for a full build.