From 6d18d5b728787caf02d78dc618a9ec433fa4fde5 Mon Sep 17 00:00:00 2001 From: Gabriel Radureau Date: Mon, 6 Apr 2026 12:34:42 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20fix:=20add=20swagger=20docs=20ge?= =?UTF-8?q?neration=20to=20CI=20workflow?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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. --- .gitea/workflows/go-ci-cd.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.gitea/workflows/go-ci-cd.yaml b/.gitea/workflows/go-ci-cd.yaml index 76fc195..0120823 100644 --- a/.gitea/workflows/go-ci-cd.yaml +++ b/.gitea/workflows/go-ci-cd.yaml @@ -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 ./...