Fix vite start command and rename deploy script

This commit is contained in:
2026-03-12 19:59:11 +02:00
parent 6eee3ff587
commit 1dffb294ff
3 changed files with 12 additions and 3 deletions

26
scripts/deploy.sh Normal file
View File

@@ -0,0 +1,26 @@
#!/usr/bin/env bash
set -euo pipefail
REPO_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
echo "==> Pulling latest changes..."
git -C "$REPO_DIR" pull
echo "==> Publishing API..."
dotnet publish "$REPO_DIR/api/App/App.csproj" \
-c Release \
-o "$REPO_DIR/api/publish"
echo "==> Restarting API service..."
sudo systemctl restart klapi-api
echo "==> Installing UI dependencies..."
cd "$REPO_DIR/ui" && bun install --frozen-lockfile
echo "==> Building UI..."
bun run build
echo "==> Restarting UI process..."
pm2 restart klapi-ui
echo "==> Done."