chore: remove deploy.ps1 from repo, add to gitignore
This commit is contained in:
@@ -43,3 +43,6 @@ Thumbs.db
|
|||||||
# Testing
|
# Testing
|
||||||
coverage
|
coverage
|
||||||
.nyc_output
|
.nyc_output
|
||||||
|
|
||||||
|
# Deploy scripts
|
||||||
|
deploy.ps1
|
||||||
|
|||||||
-27
@@ -1,27 +0,0 @@
|
|||||||
# ReSekai Deploy Script
|
|
||||||
# Usage: .\deploy.ps1
|
|
||||||
|
|
||||||
$SERVER = "root@46.225.108.69"
|
|
||||||
$PROJECT_PATH = "/var/www/resekai/ReSekai"
|
|
||||||
|
|
||||||
Write-Host "Deploying ReSekai to production..." -ForegroundColor Cyan
|
|
||||||
|
|
||||||
# Build locally first
|
|
||||||
Write-Host "`nBuilding frontend..." -ForegroundColor Yellow
|
|
||||||
npm run build
|
|
||||||
if ($LASTEXITCODE -ne 0) {
|
|
||||||
Write-Host "Build failed!" -ForegroundColor Red
|
|
||||||
exit 1
|
|
||||||
}
|
|
||||||
|
|
||||||
# Deploy to server
|
|
||||||
Write-Host "`nDeploying to server..." -ForegroundColor Yellow
|
|
||||||
$CMD = "cd $PROJECT_PATH && git pull && npm install && npm run build && cd server && npm install && pm2 restart resekai-api"
|
|
||||||
ssh $SERVER $CMD
|
|
||||||
|
|
||||||
if ($LASTEXITCODE -eq 0) {
|
|
||||||
Write-Host "`nDeployment successful!" -ForegroundColor Green
|
|
||||||
} else {
|
|
||||||
Write-Host "`nDeployment failed!" -ForegroundColor Red
|
|
||||||
exit 1
|
|
||||||
}
|
|
||||||
Reference in New Issue
Block a user