Fix vite start command and rename deploy script
This commit is contained in:
26
scripts/deploy.sh
Normal file
26
scripts/deploy.sh
Normal 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."
|
||||
Reference in New Issue
Block a user