diff --git a/justfile b/justfile index 6ad4bbd..e76903f 100644 --- a/justfile +++ b/justfile @@ -36,7 +36,7 @@ api-publish: dotnet publish {{api_project}} -c Release -o {{root_dir}}/api/publish deploy-new-version: - {{root_dir}}/scripts/deploy-api.sh + {{root_dir}}/scripts/deploy.sh ui-install: cd {{ui_dir}} && bun install diff --git a/scripts/deploy-api.sh b/scripts/deploy.sh similarity index 59% rename from scripts/deploy-api.sh rename to scripts/deploy.sh index cb6fc33..6914248 100644 --- a/scripts/deploy-api.sh +++ b/scripts/deploy.sh @@ -11,7 +11,16 @@ dotnet publish "$REPO_DIR/api/App/App.csproj" \ -c Release \ -o "$REPO_DIR/api/publish" -echo "==> Restarting service..." +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." diff --git a/ui/package.json b/ui/package.json index 0585f00..e8d5319 100644 --- a/ui/package.json +++ b/ui/package.json @@ -4,7 +4,7 @@ "scripts": { "dev": "vite", "build": "vite build", - "start": "vite preview", + "start": "vite preview --host 127.0.0.1 --port 4173", "test": "vitest run", "test:watch": "vitest", "lint": "biome lint src",