Init Gitea
This commit is contained in:
15
etc/svr_git_hooks_post-receive
Normal file
15
etc/svr_git_hooks_post-receive
Normal file
@@ -0,0 +1,15 @@
|
||||
# Git hooks in server's ~/your-app.git/hooks/post-receive
|
||||
#!/bin/bash
|
||||
|
||||
TARGET_DIR=~/sisai-world
|
||||
GIT_DIR=~/cicd/sisai-world-cicd.git
|
||||
BRANCH=main
|
||||
|
||||
# Checkout the code to the target directory
|
||||
git --work-tree=$TARGET_DIR --git-dir=$GIT_DIR checkout -f $BRANCH
|
||||
|
||||
# Navigate to the target directory
|
||||
cd $TARGET_DIR
|
||||
|
||||
# Our code support hot reload, refer 'Hot reload support' in process.js
|
||||
|
||||
Reference in New Issue
Block a user