From 0832c05e77e41b42237ba93ee6e634e61a4d6d45 Mon Sep 17 00:00:00 2001 From: Anthony Wang Date: Sat, 7 Dec 2024 01:05:04 -0500 Subject: Use push option to skip build --- post-receive | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/post-receive b/post-receive index d888042..1e86a78 100644 --- a/post-receive +++ b/post-receive @@ -1,7 +1,13 @@ +# Skip build if using git push with -o or --push-option +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 git submodule update -- cgit v1.2.3-70-g09d2