mp1pro / codex33

Personal Portfolio built with ReactJS
0 stars 0 forks source link

setting up prod and dev git bare #60

Closed mp1pro closed 3 years ago

mp1pro commented 3 years ago

!/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