aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKylie McClain <kylie@somas.is>2020-07-04 18:33:53 -0400
committerKylie McClain <kylie@somas.is>2020-07-04 18:33:53 -0400
commit1a4957b1c497efaaa600f05dc769e7a0e4bcec87 (patch)
tree26f1660557984f5f5b4014ba573208225bd2dc75
parent66a077ada241c9c1c070b456c4ace1320fc5b153 (diff)
downloadgitolite-admin-1a4957b1c497efaaa600f05dc769e7a0e4bcec87.tar.gz
gitolite-admin-1a4957b1c497efaaa600f05dc769e7a0e4bcec87.tar.xz
gitolite-admin-1a4957b1c497efaaa600f05dc769e7a0e4bcec87.zip
deploy-somas.is-site: initial
-rw-r--r--conf/gitolite.conf1
-rwxr-xr-xlocal/hooks/repo-specific/deploy-somas.is-site10
2 files changed, 11 insertions, 0 deletions
diff --git a/conf/gitolite.conf b/conf/gitolite.conf
index cb8b26f..e62c8d3 100644
--- a/conf/gitolite.conf
+++ b/conf/gitolite.conf
@@ -48,6 +48,7 @@ repo somasis/passage
desc = "An independent reimplementation of password-store, using `age` rather than PGP."
repo somasis/www.somas.is
+ option hook.post-receive.deploy-somas.is-site = deploy-somas.is-site
config cgit.homepage = "https://www.somas.is"
desc = "Source for my website."
diff --git a/local/hooks/repo-specific/deploy-somas.is-site b/local/hooks/repo-specific/deploy-somas.is-site
new file mode 100755
index 0000000..457639b
--- /dev/null
+++ b/local/hooks/repo-specific/deploy-somas.is-site
@@ -0,0 +1,10 @@
+#!/bin/execlineb
+
+backtick -n tempdir { mktemp -d }
+importas -u tempdir tempdir
+
+if { git clone -q . "${tempdir}"/ }
+if { make openring }
+if { jekyll build --strict_front_matter }
+if { rsync -ru --del "${tempdir}"/ deploy@angela.somas.is:/srv/www/www.somas.is/ }
+rm -rf "${tempdir}"