更改项目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 2s
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 2s
This commit is contained in:
@@ -45,13 +45,15 @@ jobs:
|
|||||||
- name: 更新或clone项目
|
- name: 更新或clone项目
|
||||||
shell: powershell
|
shell: powershell
|
||||||
run: |
|
run: |
|
||||||
if (-not (Test-Path -Path ${{ env.REPOSITORY_URL }}\.git)) {
|
if (-not (Test-Path -Path "${{ env.DESTINATION }}\.git")) {
|
||||||
# 目录不存在,执行 git clone
|
# 目录不存在,执行 git clone
|
||||||
git clone ${{ env.REPOSITORY_URL }} ${{ env.DESTINATION }}
|
git clone "${{ env.REPOSITORY_URL }}" "${{ env.DESTINATION }}"
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
# 目录存在,执行 git pull
|
# 目录存在,更新远程地址并拉取
|
||||||
Set-Location ${{ env.DESTINATION }}
|
Set-Location "${{ env.DESTINATION }}"
|
||||||
|
# 检查并更新远程地址
|
||||||
|
git remote set-url origin "${{ env.REPOSITORY_URL }}"
|
||||||
git pull
|
git pull
|
||||||
}
|
}
|
||||||
- name: Set up Python
|
- name: Set up Python
|
||||||
|
|||||||
Reference in New Issue
Block a user