#!/bin/bash # 更新代码 git pull # 安装依赖 npm install # 构建前端(如果需要) # npm run build # 重启PM2应用 pm2 restart ecosystem.config.js --env production # 重载Nginx配置 nginx -t && brew services reload nginx