# Auto Deploy Script for PowerShell $SERVER = "43.139.42.137" $USER = "root" $REMOTE_PATH = "/home/1panel/www/sites/admin.petshy.tashowz.com/index" Write-Host "=== Auto Deploy ===" -ForegroundColor Cyan Write-Host "" # 1. Build project Write-Host "Building project..." -ForegroundColor Yellow pnpm build if ($LASTEXITCODE -ne 0) { Write-Host "Build failed" -ForegroundColor Red exit 1 } Write-Host "Build complete" -ForegroundColor Green Write-Host "" # 2. Upload files Write-Host "Uploading files to server..." -ForegroundColor Yellow scp -r dist/* ${USER}@${SERVER}:${REMOTE_PATH}/ if ($LASTEXITCODE -eq 0) { Write-Host "" Write-Host "Deploy complete!" -ForegroundColor Green Write-Host "Visit: http://admin.petshy.tashowz.com" -ForegroundColor Cyan } else { Write-Host "Upload failed" -ForegroundColor Red exit 1 }