From 9b477ae5c324b50258fb7c58ab3ae61fd120488e Mon Sep 17 00:00:00 2001 From: Alexey Bagno Date: Sat, 29 Aug 2026 11:06:48 +0500 Subject: [PATCH] CI: removed old web/dist --- .gitea/workflows/deploy.yml | 2 +- .gitignore | 2 +- Makefile | 4 ++-- server/main.go | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.gitea/workflows/deploy.yml b/.gitea/workflows/deploy.yml index e3807e8..4a39cd6 100644 --- a/.gitea/workflows/deploy.yml +++ b/.gitea/workflows/deploy.yml @@ -21,6 +21,6 @@ jobs: chmod +x ~/apps/hub/hub-api cp config.yaml ~/apps/hub/config.yaml cp -r scripts/. ~/apps/hub/scripts/ - cp -r web/dist/. ~/apps/hub/dist/ + cp -r dist/. ~/apps/hub/dist/ chmod +x ~/apps/hub/hub-api ~/apps/hub/scripts/* systemctl --user restart hub-api diff --git a/.gitignore b/.gitignore index c4de558..c3fd08d 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,4 @@ bin/ +dist/ node_modules/ -web/dist/ .DS_Store diff --git a/Makefile b/Makefile index 4ebcb28..348b73e 100644 --- a/Makefile +++ b/Makefile @@ -9,8 +9,8 @@ proto: ## Regenerate Go + TS code from proto --es_out=web/src/gen --es_opt=target=ts \ proto/homelab/v1/homelab.proto -web: ## Build frontend into web/dist (tsc + vite) - cd web && pnpm install --frozen-lockfile && pnpm build +web: ## Build frontend into dist/ (tsc + vite) — same dir the binary serves + cd web && pnpm install --frozen-lockfile && pnpm build && rm -rf ../dist && cp -r dist ../dist server: ## Build Go binary → bin/hub-api go build -o bin/hub-api ./server diff --git a/server/main.go b/server/main.go index 1af7fb1..58d4e72 100644 --- a/server/main.go +++ b/server/main.go @@ -214,7 +214,7 @@ func main() { } }) - // Static PWA from dist/ next to the binary (CI copies web/dist → dist); HTML5 mode falls back to index.html for SPA routes. + // Static PWA from dist/ (built by make web); HTML5 mode falls back to index.html for SPA routes. e.Use(middleware.StaticWithConfig(middleware.StaticConfig{ Root: "dist", HTML5: true,