🐛 fix: add swagger docs generation to CI workflow

Fix CI/CD workflow failure by adding swagger documentation generation

step before building packages.

The workflow was failing with:

  pkg/server/server.go:30:12: pattern docs/swagger.json: no matching files found

Root cause: The //go:embed directive requires generated swagger docs

but the workflow didn't generate them before building.

Solution: Added 'Generate Swagger Docs' step:

  - name: Generate Swagger Docs

    run: cd pkg/server && go generate

Also generated the missing docs locally to fix immediate issue:

  cd pkg/server && go generate

This ensures swagger.json, swagger.yaml, and docs.go are created

before the build step, preventing the embed directive from failing.
This commit is contained in:
2026-04-06 12:34:42 +02:00
parent 7677b86b06
commit 6d18d5b728

View File

@@ -60,6 +60,9 @@ jobs:
- name: Install dependencies
run: go mod tidy
- name: Generate Swagger Docs
run: cd pkg/server && go generate
- name: Build all packages
run: go build ./...