aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnthony Wang2024-12-10 19:36:00 -0500
committerAnthony Wang2024-12-10 19:36:00 -0500
commit11852479a8e2994cee4476108d5adde96b56afad (patch)
tree986c7731fbcfe04cc8aa8bec8c11b2bfe60b3b11
parentaa33a171d16be6564534bdc1bf65a1a1784d7cd2 (diff)
Use Git worktree for autodeploy
-rw-r--r--post-receive9
1 files changed, 2 insertions, 7 deletions
diff --git a/post-receive b/post-receive
index 1e86a78..0da0bf7 100644
--- a/post-receive
+++ b/post-receive
@@ -3,13 +3,8 @@ if [[ -v GIT_PUSH_OPTION_0 ]]; then
exit
fi
-# Solution to
-# remote: fatal: not a git repository: '.'
-unset GIT_DIR
-
-# Update local clone
-cd /var/lib/forgejo/website
-git pull
+# Update worktree
+cd ~/Code/website
git submodule update
# Manually copy static since btrfs COW is super fast