blob: fe4f5f69b8d4a495e2b04761acbe0d746468db30 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
|
#!/bin/sh
set -e
export PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
WORK=/home/git/build/sites
cd "$WORK"
python3 _shared/build.py .
for SITE in irc.gumx.cc vpn.gumx.cc mail.gumx.cc pgp.gumx.cc wk.fo twt.gumx.cc files.gumx.cc demo.gumx.cc; do
if [ -d "$SITE" ]; then
WEBROOT="/var/www/$SITE"
mkdir -p "$WEBROOT"
case "$SITE" in
irc.gumx.cc)
# bots/ is managed by irc-bots repo
rsync -rlptD --delete --exclude='/fonts' --exclude='/bots/' "$SITE/" "$WEBROOT/"
;;
twt.gumx.cc)
# twtxt.txt is written by alfred/twt.sh, not tracked in this repo
rsync -rlptD --delete --exclude='/fonts' --exclude='/twtxt.txt' "$SITE/" "$WEBROOT/"
;;
demo.gumx.cc)
# no-style-please/ is managed by zola-no-style-please repo; demos.json is a source file
rsync -rlptD --delete --exclude='/fonts' --exclude='/no-style-please/' --exclude='/demos.json' "$SITE/" "$WEBROOT/"
;;
*)
rsync -rlptD --delete --exclude='/fonts' "$SITE/" "$WEBROOT/"
;;
esac
mkdir -p "$WEBROOT/fonts"
rsync -rlptD fonts/ "$WEBROOT/fonts/"
cp _shared/404.html "$WEBROOT/404.html"
fi
done
chmod +x /var/www/wk.fo/pks/cgi-bin/pgp-hkp.sh || true
chmod +x /var/www/pgp.gumx.cc/cgi-bin/pgp-hkp.sh || true
# 404 page for sites outside this hook
cp _shared/404.html /var/www/gumx.cc/404.html || true
cp _shared/404.html /usr/share/webapps/cgit/404.html || true
echo "sites deployed"
|