summaryrefslogtreecommitdiff
path: root/watch.sh
blob: ff1749ddab5f3748a8db479eba12ecce9afe6c0b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
#!/bin/sh

while true; do
  (git fetch && git reset --hard origin) || git clone "$REPO" . && git submodule update --init
  git submodule update --remote
  hugo
  rm -Rf /var/www/hugo_pub
  mv -f ./public /var/www/hugo_pub
  chown -R root:www-data /var/www/hugo_pub
  sleep 60
done