Closed mp1pro closed 3 years ago
echo "i started"
git --work-tree=/var/www/codex33.com --git-dir=/var/repo/codex33.git checkout -f
changed_files="$(git diff --name-only HEAD^ HEAD)"
check_run() { echo "running check" echo "$changed_files" | grep --quiet "$1" && eval "$2" }
run_install() { echo "start install" cd /var/www/codex33.com npm install && pm2 reload server.js --watch echo "npm installed and reloaded" } check_run package.json run_install
!/bin/sh
echo "i started"
git --work-tree=/var/www/codex33.com --git-dir=/var/repo/codex33.git checkout -f
changed_files="$(git diff --name-only HEAD^ HEAD)"
check_run() { echo "running check" echo "$changed_files" | grep --quiet "$1" && eval "$2" }
run_install() { echo "start install" cd /var/www/codex33.com npm install && pm2 reload server.js --watch echo "npm installed and reloaded" } check_run package.json run_install