Skip to content

Commit

Permalink
🐎 ci: 更改
Browse files Browse the repository at this point in the history
  • Loading branch information
zhenghui-su committed Jun 18, 2024
1 parent 7fff5d8 commit 01a8fcc
Showing 1 changed file with 15 additions and 5 deletions.
20 changes: 15 additions & 5 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,12 @@ jobs:
with:
node-version: 18.20.2

- name: 下载依赖
run: npm install

- name: 打包
run: npm run build

- name: 上传腾讯云
uses: easingthemes/ssh-deploy@main
with:
Expand All @@ -32,8 +38,12 @@ jobs:
REMOTE_USER: "root"
TARGET: "/www/wwwroot"

- name: 将代码部署到服务器
run: |
ssh \
root@${{ secrets.REMOTE_HOST }} \
"cd /www/wwwroot/su-discord && git pull origin master && npm install && pm2 reload ecosystem.config.js --env production"
- name: 运行
uses: appleboy/ssh-action@master
with:
host: ${{ secrets.REMOTE_HOST }}
username: root
key: ${{ secrets.PRIVATE_KEY }}
script: |
cd /www/wwwroot/su-discord
pm2 reload ecosystem.config.js --env production

0 comments on commit 01a8fcc

Please sign in to comment.