fix: move upload before tests (tests may clean .next/), use if-no-files-found: error
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user