Open joelin109 opened 6 years ago
/mnt/web/deploy.bstcine.com/wwwroot/cmd/
$ git-check-restart-test.sh
cd /mnt/web/deploy.bstcine.com/wwwroot/cmd/codegit
if [ ! -d "cine.web" ];
then
echo "checkout git code start..."
mkdir cine.web
cd cine.web
git init
git remote add origin git@gitee.com:bstcine/cine.web.git
git pull origin master
echo "checkout git code done."
else
echo "update git code start..."
cd cine.web
git pull origin master
echo "update git code done."
fi
rm -rf bin src/server/Config.js doc
cp -R * /mnt/web/test.bstcine.com/wwwroot
echo "deploy code done"
cd /mnt/web/test.bstcine.com/wwwroot/
cnpm install
echo "npm install done"
/mnt/web/test.bstcine.com/wwwroot/bin/restart.sh
echo "restart cine.test done"
cd /mnt/web/deploy.bstcine.com/wwwroot/cmd/codegit if [ ! -d "cine.web" ]; then echo "checkout git code start..." mkdir cine.web cd cine.web git init git remote add origin git@gitee.com:bstcine/cine.web.git git pull origin master echo "checkout git code done." else echo "update git code start..." cd cine.web git pull origin master echo "update git code done." fi rm -rf bin src/server/Config.js doc cp -R * /mnt/web/app.bstcine.com/wwwroot echo "deploy code done" cd /mnt/web/app.bstcine.com/wwwroot/ cnpm install echo "npm install done" /mnt/web/app.bstcine.com/wwwroot/bin/restart.sh echo "restart cine.web done"
步骤
$ ssh-copy-id -i /Users/joe/.ssh/id_rsa.pub root@bstcine.com