fix
This commit is contained in:
1 parent
834a44b25f
commit
cbda2e3531
1 file changed
+5
-15
@@ -18,26 +18,16 @@ jobs:
|
||||
steps:
|
||||
# 通过SSH连接服务器进行部署
|
||||
- name: Deploy to server
|
||||
uses: appleboy/ssh-action@v1.0.3
|
||||
uses: appleboy/ssh-action@v1.2.0
|
||||
with:
|
||||
host: ${{ secrets.HOST_PI }}
|
||||
username: pi
|
||||
password: ${{ secrets.PASS_PI }}
|
||||
port: 22
|
||||
command_timeout: 10m
|
||||
script_stop: true
|
||||
envs: HOME,PATH
|
||||
script: |
|
||||
# 进入项目目录
|
||||
cd /home/pi/license-manager
|
||||
|
||||
# 拉取最新代码
|
||||
echo "Pulling latest changes from repository..."
|
||||
git pull origin main
|
||||
|
||||
# 使用PM2重启应用
|
||||
echo "Restarting license-manager with PM2..."
|
||||
pm2 restart license-manager
|
||||
|
||||
# 检查PM2状态
|
||||
echo "Checking PM2 status..."
|
||||
pm2 status license-manager
|
||||
|
||||
echo "Deployment completed successfully!"
|
||||
pm2 restart license_manager
|
||||
Reference in new issue
Block a user