From 1c7ff54fe20cf53d5d66a805986b598d49ddff2b Mon Sep 17 00:00:00 2001 From: Alexey Bagno Date: Sat, 29 Aug 2026 10:47:27 +0500 Subject: [PATCH] CI: move dist to app dir --- .gitea/workflows/deploy.yml | 7 +++---- server/main.go | 4 ++-- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/.gitea/workflows/deploy.yml b/.gitea/workflows/deploy.yml index 25c5b61..a4cf013 100644 --- a/.gitea/workflows/deploy.yml +++ b/.gitea/workflows/deploy.yml @@ -15,11 +15,10 @@ jobs: - name: Deploy to box run: | - mkdir -p ~/apps/hub/dist - cp -r web/dist/* ~/apps/hub/dist/ + mkdir -p ~/apps/hub/dist ~/apps/hub/scripts cp bin/hub-api ~/apps/hub/hub-api - chmod +x ~/apps/hub/hub-api cp config.yaml ~/apps/hub/config.yaml - cp -r scripts/* ~/apps/hub/scripts/ + cp -r scripts/. ~/apps/hub/scripts/ + cp -r web/dist/. ~/apps/hub/dist/ chmod +x ~/apps/hub/hub-api ~/apps/hub/scripts/* systemctl --user restart hub-api diff --git a/server/main.go b/server/main.go index 83f95e5..1af7fb1 100644 --- a/server/main.go +++ b/server/main.go @@ -214,9 +214,9 @@ func main() { } }) - // Static PWA from web/dist (built by make web); HTML5 mode falls back to index.html for SPA routes. + // Static PWA from dist/ next to the binary (CI copies web/dist → dist); HTML5 mode falls back to index.html for SPA routes. e.Use(middleware.StaticWithConfig(middleware.StaticConfig{ - Root: "web/dist", + Root: "dist", HTML5: true, }))