next.js 本地远程编译命令

4 min read
git add .
# 提交当前的时间戳
git commit -m "dev:$(date +%Y%m%d-%H%M%S)"
git push
# 需要先提交代码到远程仓库中
ssh 47 -T <  "./upload.sh"

执行远程服务器命令

cd next-blog
yarn
git fetch --all
git reset --hard origin/master
git pull
npm i
npm run build
pm2 restart 0
pm2 save