From: Armaan Bhojwani Date: Fri, 18 Dec 2020 16:37:06 +0000 (-0500) Subject: add web-update-server to repo X-Git-Tag: v0.0.1~74 X-Git-Url: https://git.armaanb.net/?p=bin.git;a=commitdiff_plain;h=f2fd615b38847e5b452685a67bd7ab7863da3c0d add web-update-server to repo --- diff --git a/web-update-server b/web-update-server new file mode 100755 index 0000000..1a0f397 --- /dev/null +++ b/web-update-server @@ -0,0 +1,24 @@ +#!/usr/bin/env bash +# Executed over ssh on sr.ht CI/CD for my websites + +gitrun() { + git -C $dir reset --hard + git -C $dir clean -fxd + git -C $dir pull --ff-only +} + +if [[ $1 == "gemini" ]]; then + dir=/var/www/armaanb.net-gemini + gitrun + (cd /var/www/armaanb.net-gemini ; python3 mdconvert.py) +elif [[ $1 == "gopher" ]]; then + dir=/var/www/armaanb.net-gopher + gitrun +elif [[ $1 == "fortune" ]]; then + dir=/var/www/fortune-online + gitrun +elif [[ $1 == "http" ]]; then + dir=/var/www/armaanb.net-http + gitrun + (cd /var/www/armaanb.net-http ; bash rss-gen) +fi