summaryrefslogtreecommitdiff
path: root/hooks/post-receive
diff options
context:
space:
mode:
authorErik Kundiman <erik@megapahit.org>2024-12-02 14:17:39 +0800
committerErik Kundiman <erik@megapahit.org>2024-12-02 14:17:39 +0800
commitdbbfd7148a548eb21677913483e7d79698e03d2c (patch)
treeb3f93a49c5471124bff12a8a0ac9edc598a65b4b /hooks/post-receive
parent6573bd24b06b7ef3b96bde9877a6be612fe3aaf9 (diff)
Rename product to website & track the post-commit
and put the hooks in its own folder.
Diffstat (limited to 'hooks/post-receive')
-rwxr-xr-xhooks/post-receive13
1 files changed, 13 insertions, 0 deletions
diff --git a/hooks/post-receive b/hooks/post-receive
new file mode 100755
index 0000000..d84579e
--- /dev/null
+++ b/hooks/post-receive
@@ -0,0 +1,13 @@
+#!/bin/sh
+
+product=website
+repo=/usr/local/git/pub/$product.git
+web=~www/apache24/data
+
+unset GIT_DIR
+cd $HOME/$product \
+ && git pull \
+ && git --git-dir=$repo --work-tree=$web checkout -f master -- \
+ index.html \
+ 7.1.11.53043.html \
+ && git --git-dir=$repo push