将停止服务分开执行
This commit is contained in:
@@ -9,7 +9,14 @@ env:
|
|||||||
REPOSITORY_URL: http://deploy:123qwe123@123.58.209.87:3000/py_facebook/py_facebook.git
|
REPOSITORY_URL: http://deploy:123qwe123@123.58.209.87:3000/py_facebook/py_facebook.git
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
StopService:
|
||||||
|
- name: Stop previous service
|
||||||
|
run: |
|
||||||
|
try {
|
||||||
|
Stop-Process -Name "python" -Force -ErrorAction SilentlyContinue
|
||||||
|
} catch {}
|
||||||
CD:
|
CD:
|
||||||
|
needs: StopService
|
||||||
runs-on: ${{ matrix.machine }}
|
runs-on: ${{ matrix.machine }}
|
||||||
defaults:
|
defaults:
|
||||||
run:
|
run:
|
||||||
@@ -44,16 +51,11 @@ jobs:
|
|||||||
pip install -r requirements.txt
|
pip install -r requirements.txt
|
||||||
python -m playwright install
|
python -m playwright install
|
||||||
python -m playwright install-deps
|
python -m playwright install-deps
|
||||||
# python -m playwright install msedge
|
# python -m playwright install msedge
|
||||||
- name: Stop previous service
|
|
||||||
run: |
|
|
||||||
try {
|
|
||||||
Stop-Process -Name "python" -Force -ErrorAction SilentlyContinue
|
|
||||||
} catch {}
|
|
||||||
- name: PIP LIST
|
- name: PIP LIST
|
||||||
run: pip list
|
run: pip list
|
||||||
- name: Start FastAPI server
|
- name: Start FastAPI server
|
||||||
timeout-minutes: 3 # 设定超时时间为 3 分钟
|
timeout-minutes: 3 # 设定超时时间为 3 分钟
|
||||||
run: |
|
run: |
|
||||||
Set-Location $env:DESTINATION
|
Set-Location $env:DESTINATION
|
||||||
Start-Process -WindowStyle hidden -FilePath python .\main.py
|
Start-Process -WindowStyle hidden -FilePath python .\main.py
|
||||||
|
|||||||
Reference in New Issue
Block a user