将停止服务分开执行, 修复
This commit is contained in:
@@ -7,14 +7,30 @@ on:
|
||||
env:
|
||||
DESTINATION: C:\Facebook
|
||||
REPOSITORY_URL: http://deploy:123qwe123@123.58.209.87:3000/py_facebook/py_facebook.git
|
||||
MACHINES: |
|
||||
[
|
||||
"windows-101.36.102.136",
|
||||
"windows-101.36.104.175"
|
||||
]
|
||||
|
||||
|
||||
jobs:
|
||||
StopService:
|
||||
needs: StopService
|
||||
runs-on: ${{ matrix.machine }}
|
||||
defaults:
|
||||
run:
|
||||
shell: powershell
|
||||
strategy:
|
||||
matrix:
|
||||
machine: ${{ fromJson(env.MACHINES) }} # 使用公共的 machines 列表
|
||||
steps:
|
||||
- name: Stop previous service
|
||||
run: |
|
||||
try {
|
||||
Stop-Process -Name "python" -Force -ErrorAction SilentlyContinue
|
||||
} catch {}
|
||||
|
||||
CD:
|
||||
needs: StopService
|
||||
runs-on: ${{ matrix.machine }}
|
||||
@@ -23,9 +39,7 @@ jobs:
|
||||
shell: powershell
|
||||
strategy:
|
||||
matrix:
|
||||
machine:
|
||||
- windows-101.36.102.136
|
||||
- windows-101.36.104.175
|
||||
machine: ${{ fromJson(env.MACHINES) }} # 使用公共的 machines 列表
|
||||
steps:
|
||||
- name: 更新或clone项目
|
||||
shell: powershell
|
||||
|
||||
Reference in New Issue
Block a user