This repository has been archived on 2026-01-21. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
Acad-IA/deploy.ps1

27 lines
728 B
PowerShell

# Fail fast
$ErrorActionPreference = 'Stop'
# Config
$REMOTE_HOST = "github.lci.ulsa.mx"
$REMOTE_USER = "root"
$REMOTE_PATH = "/var/lib/docker/sistemas/genesis/layout"
Write-Output "▶ Building project..."
bun run build
Write-Output "▶ Cleaning remote folder..."
ssh ${REMOTE_USER}@${REMOTE_HOST} "find ${REMOTE_PATH} -mindepth 1 -delete"
Write-Output "▶ Uploading dist to server..."
scp -r ./dist/* ${REMOTE_USER}@${REMOTE_HOST}:${REMOTE_PATH}/
Write-Output "▶ Fixing permissions (assets)..."
ssh ${REMOTE_USER}@${REMOTE_HOST} "chmod -R 755 ${REMOTE_PATH}/assets || true"
Write-Output "▶ Remove dist (local)..."
if (Test-Path ./dist) {
Remove-Item -Recurse -Force ./dist
}
Write-Output "✅ Deploy finished!"