Skip to content

Commit

Permalink
Update deploy.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
kangood committed May 24, 2024
1 parent f1edbd6 commit 462a7f1
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,22 @@ jobs:

- name: Build Next.js app
run: pnpm build


- name: Check pnpm and pm2 installation
run: |
echo $(which pnpm)
echo $(which pm2)
- name: Deploy to Custom Server
uses: appleboy/ssh-action@master
with:
host: ${{ secrets.SERVER_HOST }} # 服务器IP或域名
username: ${{ secrets.SERVER_USERNAME }} # 服务器用户名
key: ${{ secrets.SERVER_SSH_KEY }} # 服务器SSH私钥
script: |
PNPM_PATH=$(which pnpm)
PM2_PATH=$(which pm2)
cd /home/project/blog-web
git pull origin master
pnpm install --production
pm2 restart blog-web
$PNPM_PATH install --production
$PM2_PATH restart blog-web

0 comments on commit 462a7f1

Please sign in to comment.