Skip to content
This repository was archived by the owner on Feb 11, 2026. It is now read-only.

Commit fa3a739

Browse files
authored
Merge pull request #7 from pdnode-team/main
Ensure that the code in the dev and main branches is consistent.
2 parents c528e92 + 4a3afac commit fa3a739

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

.github/workflows/deploy.yml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
name: Deploy AdonisJS App
22

3+
permissions:
4+
contents: read
5+
36
on:
47
push:
58
branches: [ main ] # 当 main 分支收到推送时触发
@@ -17,10 +20,12 @@ jobs:
1720
host: ${{ secrets.REMOTE_HOST }}
1821
username: ${{ secrets.REMOTE_USER }}
1922
password: ${{ secrets.SSH_PASS }}
23+
port: 2222
2024
script: |
2125
export PNPM_HOME="/home/deploy/.local/share/pnpm"
2226
export PATH="$PNPM_HOME:$PATH"
2327
# 1. 进入目录并拉取代码
28+
2429
cd ~/account-dev
2530
git pull origin main
2631
@@ -35,7 +40,7 @@ jobs:
3540
pnpm install --prod
3641
3742
# 4. 使用 PM2 平滑重启
38-
pm2 restart 0
43+
pnpx pm2 restart 0
3944
4045
# 保存 PM2 状态,确保服务器重启后自动启动
41-
pm2 save
46+
pnpx pm2 save

0 commit comments

Comments
 (0)