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
|
- name: Install dependencies
|
||||||
run: bun install --frozen-lockfile
|
run: bun install --frozen-lockfile
|
||||||
|
|
||||||
# Real build: typecheck + turbo across all workspace packages.
|
|
||||||
- name: Typecheck
|
- name: Typecheck
|
||||||
run: bun run typecheck
|
run: bun run typecheck
|
||||||
|
|
||||||
@@ -35,9 +34,14 @@ jobs:
|
|||||||
working-directory: apps/web
|
working-directory: apps/web
|
||||||
run: bun run build
|
run: bun run build
|
||||||
|
|
||||||
- name: List .next contents
|
# Upload immediately after build — before tests may modify .next.
|
||||||
working-directory: apps/web
|
# The deploy job copies this directly to the VPS — no build on VPS.
|
||||||
run: ls -la .next/ | head -10
|
- 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
|
# Smoke: verify the MCP server + resources load and the indexer/module
|
||||||
# graph resolves. Requires Postgres + Redis — only runs when available.
|
# graph resolves. Requires Postgres + Redis — only runs when available.
|
||||||
@@ -55,15 +59,6 @@ jobs:
|
|||||||
- name: Test
|
- name: Test
|
||||||
run: bun run 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:
|
deploy:
|
||||||
name: deploy to VPS
|
name: deploy to VPS
|
||||||
needs: build
|
needs: build
|
||||||
|
|||||||
Reference in New Issue
Block a user