From 388de3559a071f33bfe4a7bde22eeb8aee1d83cf Mon Sep 17 00:00:00 2001 From: asepharyana Date: Fri, 21 Aug 2026 12:16:08 +0700 Subject: [PATCH] fix: move upload before tests (tests may clean .next/), use if-no-files-found: error --- .github/workflows/ci.yml | 21 ++++++++------------- 1 file changed, 8 insertions(+), 13 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index fb2b476..1980c11 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -27,7 +27,6 @@ jobs: - name: Install dependencies run: bun install --frozen-lockfile - # Real build: typecheck + turbo across all workspace packages. - name: Typecheck run: bun run typecheck @@ -35,9 +34,14 @@ jobs: working-directory: apps/web run: bun run build - - name: List .next contents - working-directory: apps/web - run: ls -la .next/ | head -10 + # Upload immediately after build — before tests may modify .next. + # The deploy job copies this directly to the VPS — no build on VPS. + - name: Upload web build artifact + uses: actions/upload-artifact@v4 + with: + name: mcpedia-web-build + path: apps/web/.next + if-no-files-found: error # Smoke: verify the MCP server + resources load and the indexer/module # graph resolves. Requires Postgres + Redis — only runs when available. @@ -55,15 +59,6 @@ jobs: - name: Test run: bun run test - # Upload the built .next directory as a deploy artifact. - # The deploy job copies this directly to the VPS — no build needed there. - - name: Upload web build artifact - uses: actions/upload-artifact@v4 - with: - name: mcpedia-web-build - path: ${{ github.workspace }}/apps/web/.next - retention-days: 1 - deploy: name: deploy to VPS needs: build