From 894976e680dc51dce2643461789b9a4578b42305 Mon Sep 17 00:00:00 2001 From: dmy Date: Tue, 13 Jan 2026 19:01:50 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=9C=A8=E9=83=A8=E7=BD=B2=E8=84=9A?= =?UTF-8?q?=E6=9C=AC=E4=B8=AD=E6=B7=BB=E5=8A=A0src=E7=9B=AE=E5=BD=95?= =?UTF-8?q?=E4=B8=8A=E4=BC=A0=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/scripts/deploy.ps1 | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/src/scripts/deploy.ps1 b/src/scripts/deploy.ps1 index e8053ea..be03bc5 100644 --- a/src/scripts/deploy.ps1 +++ b/src/scripts/deploy.ps1 @@ -7,6 +7,7 @@ $remoteUser = "cubie" $keyPath = "d:\163" $serverDest = "/home/cubie/down/document/bidding/publish/server" $frontendDest = "/home/cubie/down/document/bidding/publish/" +$srcDest = "/home/cubie/down/document/bidding/" # Check if key file exists if (-not (Test-Path $keyPath)) { @@ -26,6 +27,12 @@ if (-not (Test-Path "frontend")) { exit 1 } +# Check if src directory exists +if (-not (Test-Path "src")) { + Write-Error "src directory not found" + exit 1 +} + Write-Host "Starting deployment..." -ForegroundColor Green Write-Host "Remote server: ${remoteHost}:${remotePort}" -ForegroundColor Cyan Write-Host "Private key: $keyPath" -ForegroundColor Cyan @@ -52,4 +59,15 @@ if ($LASTEXITCODE -ne 0) { Write-Host "frontend directory uploaded successfully" -ForegroundColor Green +# Upload entire src directory to bidding directory +Write-Host "`nUploading src directory to ${srcDest}..." -ForegroundColor Yellow +scp -i $keyPath -P $remotePort -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -r src "${remoteUser}@${remoteHost}:${srcDest}" + +if ($LASTEXITCODE -ne 0) { + Write-Error "Failed to upload src directory" + exit 1 +} + +Write-Host "src directory uploaded successfully" -ForegroundColor Green + Write-Host "`nDeployment completed!" -ForegroundColor Green