Skip to content

Commit

Permalink
Update deploy.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
kangood authored May 24, 2024
1 parent d53166f commit d3585a4
Showing 1 changed file with 6 additions and 9 deletions.
15 changes: 6 additions & 9 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,21 +26,18 @@ jobs:
- name: Build Next.js app
run: pnpm build

- name: Check pnpm and pm2 installation
- name: Install pnpm and pm2
run: |
echo $(which pnpm)
echo $(which pm2)
npm install -g pnpm
npm install -g 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私钥
host: ${{ secrets.SERVER_HOST }}
username: ${{ secrets.SERVER_USERNAME }}
key: ${{ secrets.SERVER_SSH_KEY }}
script: |
PNPM_PATH=$(which pnpm)
PM2_PATH=$(which pm2)
export PATH="$(dirname $PNPM_PATH):$(dirname $PM2_PATH):$PATH"
cd /home/project/blog-web
git pull origin master
pnpm install --production
Expand Down

0 comments on commit d3585a4

Please sign in to comment.