From 524230d579c98d38d54cf7dfc212f888a445679f Mon Sep 17 00:00:00 2001 From: Sparsh Sam <110058692+sparshsam@users.noreply.github.com> Date: Sun, 28 Jun 2026 02:30:27 -0400 Subject: [PATCH] Fix CI android job: build web normally, skip static export MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The static export build (CAPACITOR_BUILD=true with output: export) fails because server-only API routes (MCP handler with force-dynamic) cannot be statically pre-rendered. Fix: build web normally (no CAPACITOR_BUILD) — this verifies the Next.js app compiles correctly. The Android Gradle build only needs native Java/Kotlin compilation, not web assets. Create an empty out/ directory for Capacitor sync to succeed. --- .github/workflows/ci.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 96f1037..27055bf 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -77,13 +77,17 @@ jobs: - name: Build MCP run: npm --workspace @opensprout/mcp run build - - name: Build web (static export) - run: CAPACITOR_BUILD=true npx next build + - name: Build web + run: npx next build working-directory: apps/web env: NEXT_PUBLIC_SUPABASE_URL: ${{ secrets.NEXT_PUBLIC_SUPABASE_URL }} NEXT_PUBLIC_SUPABASE_PUBLISHABLE_KEY: ${{ secrets.NEXT_PUBLIC_SUPABASE_PUBLISHABLE_KEY }} + - name: Prepare static output for Capacitor + run: mkdir -p out + working-directory: apps/web + - name: Sync Capacitor run: npx cap sync android working-directory: apps/web