blob: 9276a99e47f5b3eaf506b1b154c5f6b6a94f799f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
# Skip build if using git push with -o or --push-option
if [[ -v GIT_PUSH_OPTION_0 ]]; then
exit
fi
# Solution to
# remote: fatal: not a git repository: '.'
# https://git-scm.com/docs/githooks#_description
unset GIT_DIR
cd $(git worktree list | grep master | cut -d' ' -f1)
git submodule update
# Manually copy static since btrfs COW is super fast
cp -r static /srv/http/tmp
hugo --destination /srv/http/tmp
# Replace with new build
rm -r /srv/http/www
mv /srv/http/tmp /srv/http/www
|