From e6a7545e2d7a7f954ba9c98ea107da176b5e508d Mon Sep 17 00:00:00 2001 From: Mustafa Date: Wed, 3 Apr 2024 22:04:25 -0700 Subject: [PATCH] Add git hook --- .github/hugo.sh | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 .github/hugo.sh diff --git a/.github/hugo.sh b/.github/hugo.sh new file mode 100644 index 0000000..670b0aa --- /dev/null +++ b/.github/hugo.sh @@ -0,0 +1,9 @@ +#!/bin/sh +# Written by mstf +# Add this to /var/lib/gitea/data/gitea-repositories/lug/site.git/hooks/post-receive.d +# +# Pay attention to permissions + +export GIT_WORK_TREE=/home/gitea/lug-website +git checkout -f +hugo -c="/home/gitea/lug-website" -d="/var/www/html/"