Skip to content

ServerKit is a lightweight, modern server control panel for managing web applications, databases, and services on your VPS or dedicated server. Built with Python/Flask backend and React frontend.

ci(agent): build the embedded UI before go (fix embed all:dist)

Juan Denisb5969253134f
diff --git a/.github/workflows/agent-ci.yml b/.github/workflows/agent-ci.yml
index c2c33607..275b46a8 100644
--- a/.github/workflows/agent-ci.yml
+++ b/.github/workflows/agent-ci.yml
@@ -32,6 +32,17 @@ jobs:
with:
go-version-file: agent/go.mod
cache-dependency-path: agent/go.sum
+ # The agent embeds the desktop UI via //go:embed all:dist, so the
+ # React app must be built into agent/internal/agentui/dist before any
+ # `go` command — otherwise the embed fails with "no matching files".
+ - uses: actions/setup-node@v4
+ with:
+ node-version: '20'
+ cache: 'npm'
+ cache-dependency-path: agent/ui/package-lock.json
+ - name: Build agent UI (required by //go:embed)
+ working-directory: agent/ui
+ run: npm ci && npm run build
- name: go vet
run: go vet ./...
- name: go test
@@ -61,6 +72,16 @@ jobs:
with:
go-version-file: agent/go.mod
cache-dependency-path: agent/go.sum
+ # Build the embedded desktop UI before `go build` (see //go:embed
+ # all:dist in internal/agentui/embed.go).
+ - uses: actions/setup-node@v4
+ with:
+ node-version: '20'
+ cache: 'npm'
+ cache-dependency-path: agent/ui/package-lock.json
+ - name: Build agent UI (required by //go:embed)
+ working-directory: agent/ui
+ run: npm ci && npm run build
- name: go build
env:
GOOS: ${{ matrix.goos }}
diff --git a/.github/workflows/agent-release.yml b/.github/workflows/agent-release.yml
index 55efbfab..cd9079da 100644
--- a/.github/workflows/agent-release.yml
+++ b/.github/workflows/agent-release.yml
@@ -56,6 +56,19 @@ jobs:
echo "version=$VERSION" >> $GITHUB_OUTPUT
echo "Building version: $VERSION"
+ # The agent embeds its desktop UI via //go:embed all:dist, so the React
+ # app must be built into agent/internal/agentui/dist before `go build`.
+ - name: Set up Node
+ uses: actions/setup-node@v4
+ with:
+ node-version: '20'
+ cache: 'npm'
+ cache-dependency-path: agent/ui/package-lock.json
+
+ - name: Build agent UI (required by //go:embed)
+ working-directory: agent/ui
+ run: npm ci && npm run build
+
- name: Build binary
env:
GOOS: ${{ matrix.goos }}