fix: build frontend into the go:embed path so the hub binary compiles
Build (Dev) / build (push) Failing after 17s
CI/CD / lint-and-typecheck (push) Successful in 7s
CI/CD / test (push) Successful in 7s
CI/CD / build (push) Failing after 10s
CI/CD / deploy (push) Has been skipped

cmd/server/main.go has //go:embed all:src/dist (relative to cmd/server/),
but Vite built to repo-root dist/, so cmd/server/src/dist never existed and
every `go build` failed with "pattern all:src/dist: no matching files found".
The hub binary has never built in CI as a result.

- vite.config.ts: outDir -> cmd/server/src/dist (emptyOutDir)
- commit cmd/server/src/dist/index.html placeholder so the embed always has
  a file (real build overwrites it)
- .gitignore: scope dist ignore to /dist; ignore cmd/server/src/dist/* but
  keep the index.html placeholder (the prior !src/dist/index.html rule
  pointed at the wrong path)
- ci.yaml: upload artifact from the new output path

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Joshua King
2026-06-05 08:12:36 -04:00
parent d8ea71a295
commit 8387a4208f
4 changed files with 25 additions and 5 deletions
+12
View File
@@ -0,0 +1,12 @@
<!doctype html>
<!-- Placeholder so //go:embed all:src/dist always has a file to embed.
Replaced by the real Vite build output (npm run build) at CI build time. -->
<html lang="en">
<head>
<meta charset="UTF-8" />
<title>RemoteRig Hub</title>
</head>
<body>
<p>RemoteRig hub is running. Frontend not built into this binary.</p>
</body>
</html>