This commit is contained in:
@@ -77,6 +77,7 @@ jobs:
|
||||
Stop-Process -Id $_.ProcessId -Force
|
||||
Write-Host "Stopped node PID $($_.ProcessId)"
|
||||
}
|
||||
$global:LASTEXITCODE = 0
|
||||
|
||||
- name: Deploy to production folder
|
||||
shell: powershell
|
||||
@@ -90,7 +91,9 @@ jobs:
|
||||
# Copy the fresh build over the live folder, but never touch
|
||||
# .env, uploads\ or logs\ - those belong to the running instance.
|
||||
robocopy dist\ $deployPath /E /XD "$deployPath\uploads" "$deployPath\logs" /XF ".env" /NFL /NDL /NJH /NJS
|
||||
if ($LASTEXITCODE -ge 8) { throw "robocopy failed with exit code $LASTEXITCODE" }
|
||||
$rc = $LASTEXITCODE
|
||||
if ($rc -ge 8) { throw "robocopy failed with exit code $rc" }
|
||||
$global:LASTEXITCODE = 0
|
||||
|
||||
Write-Host "Deployment completed successfully."
|
||||
|
||||
@@ -108,4 +111,5 @@ jobs:
|
||||
Start-Process -FilePath "D:\apps\sap-erp\deploy\start-server.bat" -WorkingDirectory "D:\apps\sap-erp\deploy"
|
||||
}
|
||||
|
||||
$global:LASTEXITCODE = 0
|
||||
Write-Host "Portal restart triggered."
|
||||
|
||||
Reference in New Issue
Block a user