Add package-lock and deployment script updates
This commit is contained in:
14
deploy.ps1
14
deploy.ps1
@@ -33,7 +33,21 @@ Write-Host " All files pass syntax check." -ForegroundColor Green
|
||||
# 2. Update Frontend
|
||||
Write-Host "Updating Dashboard UI..." -ForegroundColor Yellow
|
||||
if (Test-Path "$ProdRoot\sites\status") {
|
||||
# Build frontend bundles
|
||||
Write-Host "Building frontend JavaScript..." -ForegroundColor Yellow
|
||||
Set-Location "$DevRoot\status"
|
||||
& npm install
|
||||
& node build.js
|
||||
if ($LASTEXITCODE -ne 0) {
|
||||
Write-Error "Frontend build failed!"
|
||||
exit 1
|
||||
}
|
||||
Write-Host " Frontend build complete." -ForegroundColor Green
|
||||
|
||||
# Copy all necessary files
|
||||
Copy-Item "$DevRoot\status\index.html" "$ProdRoot\sites\status\index.html" -Force
|
||||
Copy-Item "$DevRoot\status\dist\*" "$ProdRoot\sites\status\dist\" -Force
|
||||
Set-Location $ProdRoot
|
||||
} else {
|
||||
Write-Warning "Target status folder not found. Skipping UI update."
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user