From 115cb1e9158a223c61a8b5f91cf1ed8bd5269d97 Mon Sep 17 00:00:00 2001 From: Alex Palaistras Date: Sat, 23 Apr 2022 13:35:02 +0100 Subject: [PATCH] hugo: Checkout correct branch when cloning --- service/hugo/container/run-hugo | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/service/hugo/container/run-hugo b/service/hugo/container/run-hugo index 75ec4b7..3f83b50 100755 --- a/service/hugo/container/run-hugo +++ b/service/hugo/container/run-hugo @@ -22,7 +22,7 @@ chown -R hugo:hugo /dest # Wait for updates to watched branch for the given site, and build static content anew. while true; do - gosu hugo /usr/bin/git clone --quiet --shared "/src/${GIT_REPO}" /tmp/src - gosu hugo /bin/hugo --verbose --source /tmp/src --destination /dest && rm -Rf /tmp/src + gosu hugo git clone --quiet --shared --branch "${GIT_BRANCH}" "/src/${GIT_REPO}" /tmp/src + gosu hugo hugo --verbose --source /tmp/src --destination /dest && rm -Rf /tmp/src inotifywait -qq --event modify "/src/${GIT_REPO}/refs/heads/${GIT_BRANCH}" && break done