You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

27 rivejä
463 B

  1. #!/bin/bash
  2. set -e
  3. echo "===== 1. 拉取最新代码 ====="
  4. git fetch --all
  5. git reset --hard origin/master
  6. echo "代码更新完成"
  7. echo ""
  8. echo "===== 2. 安装依赖 ====="
  9. pnpm i
  10. echo "依赖安装完成"
  11. echo ""
  12. echo "===== 3. 重启服务 ====="
  13. if pm2 describe vk_web > /dev/null 2>&1; then
  14. pm2 restart vk_web
  15. echo "pm2 已重启 vk_web"
  16. else
  17. pm2 start pm2.json
  18. echo "pm2 已启动 vk_web"
  19. fi
  20. echo ""
  21. pm2 status
  22. echo "===== 部署完成 ====="