From 0ceb1c1c8cf3b1a56504d54496a13f020dbfd3d5 Mon Sep 17 00:00:00 2001 From: Danila Khodjaef Date: Thu, 9 Jul 2026 13:36:33 +0300 Subject: [PATCH] Release: weekly deploy --- infra/scripts/deploy-dev-to-prod.ps1 | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/infra/scripts/deploy-dev-to-prod.ps1 b/infra/scripts/deploy-dev-to-prod.ps1 index d550c99..057de50 100644 --- a/infra/scripts/deploy-dev-to-prod.ps1 +++ b/infra/scripts/deploy-dev-to-prod.ps1 @@ -464,8 +464,24 @@ if (Get-StepEnabled $steps 'gitCommitPush') { if ($code -ne 0) { return $code } } - $code = Invoke-Git @('push', 'origin', $branch) - if ($code -ne 0) { return $code } + $pushAttempts = 2 + for ($attempt = 1; $attempt -le $pushAttempts; $attempt++) { + $code = Invoke-Git @('push', 'origin', $branch) + if ($code -eq 0) { break } + if ($attempt -lt $pushAttempts) { + Write-Host "Git push failed (exit $code). Retrying once in 3s..." -ForegroundColor Yellow + Start-Sleep -Seconds 3 + } + } + if ($code -ne 0) { + Write-Host 'Git push authentication failed for Gitea.' -ForegroundColor Red + Write-Host 'Fix: create a Gitea token with repo write access, then run:' -ForegroundColor Yellow + Write-Host ' git push origin main' -ForegroundColor Yellow + Write-Host 'If prompted credentials fail, clear cached token:' -ForegroundColor Yellow + Write-Host ' "protocol=https`nhost=gitea.mysuperlab.netcraze.pro`n" | git credential reject' -ForegroundColor Yellow + Write-Host 'Then push again and resume release with gitCommitPush disabled.' -ForegroundColor Yellow + return $code + } return 0 } if (-not $ok) { Write-ReleaseBanner -Success $false -FailedAt $FailedStep; exit 1 }