更改项目cd地址
Some checks failed
Update Code / StopService (windows-101.36.104.175) (push) Successful in 1s
Update Code / StopService (windows-101.36.102.136) (push) Successful in 0s
Update Code / CD (windows-101.36.104.175) (push) Failing after 2s
Update Code / CD (windows-101.36.102.136) (push) Failing after 1s
Some checks failed
Update Code / StopService (windows-101.36.104.175) (push) Successful in 1s
Update Code / StopService (windows-101.36.102.136) (push) Successful in 0s
Update Code / CD (windows-101.36.104.175) (push) Failing after 2s
Update Code / CD (windows-101.36.102.136) (push) Failing after 1s
This commit is contained in:
@@ -45,13 +45,13 @@ jobs:
|
||||
- name: 更新或clone项目
|
||||
shell: powershell
|
||||
run: |
|
||||
if (-not (Test-Path -Path $env:DESTINATION\.git)) {
|
||||
if (-not (Test-Path -Path ${{ env.REPOSITORY_URL }}\.git)) {
|
||||
# 目录不存在,执行 git clone
|
||||
git clone $env:REPOSITORY_URL $env:DESTINATION
|
||||
git clone ${{ env.REPOSITORY_URL }} ${{ env.DESTINATION }}
|
||||
}
|
||||
else {
|
||||
# 目录存在,执行 git pull
|
||||
Set-Location $env:DESTINATION
|
||||
Set-Location ${{ env.DESTINATION }}
|
||||
git pull
|
||||
}
|
||||
- name: Set up Python
|
||||
@@ -60,7 +60,7 @@ jobs:
|
||||
python-version: "3.10"
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
Set-Location $env:DESTINATION
|
||||
Set-Location ${{ env.DESTINATION }}
|
||||
"${{ matrix.machine }}" | Set-Content -Path "ip.txt" -Encoding UTF8
|
||||
python -m pip install --upgrade pip
|
||||
pip install -r requirements.txt
|
||||
@@ -72,5 +72,5 @@ jobs:
|
||||
- name: Start FastAPI server
|
||||
timeout-minutes: 3 # 设定超时时间为 3 分钟
|
||||
run: |
|
||||
Set-Location $env:DESTINATION
|
||||
Set-Location ${{ env.DESTINATION }}
|
||||
Start-Process -WindowStyle hidden -FilePath python .\main.py
|
||||
|
||||
Reference in New Issue
Block a user