blob: da322641b94ccaa9d8e0f0cb92f297804c102740 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
#!/bin/sh
# example git post-receive hook that i use to autobuild my website on push
# set variables, change example.com to your website repo name
GIT_REPO=$HOME/example.com.git
TMP_GIT_CLONE=$HOME/tmp/example.com
AAOTH_ROOT=/var/www/htdocs/example.com
AAOTH_GEMROOT=/var/gemini/example.com
export AAOTH_ROOT AAOTH_GEMROOT
# change branch name to your main deploy branch
git clone -b main "$GIT_REPO" "$TMP_GIT_CLONE"
# build the site
cd "$TMP_GIT_CLONE" && ./build.sh
# clean up
rm -Rf "$TMP_GIT_CLONE"
exit
|