Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 18 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -85,15 +85,31 @@ jobs:
NEXT_PUBLIC_SUPABASE_PUBLISHABLE_KEY: ${{ secrets.NEXT_PUBLIC_SUPABASE_PUBLISHABLE_KEY }}

- name: Prepare static output for Capacitor
run: mkdir -p out
run: |
mkdir -p out/_next
# Copy static assets
cp -r .next/static out/_next/ 2>/dev/null || true
# Copy page HTML files from server build
for f in .next/server/app/*/index.html; do
[ -f "$f" ] || continue
dir="$(basename "$(dirname "$f")")"
mkdir -p "out/$dir"
cp "$f" "out/$dir/index.html"
done
# Root page
[ -f .next/server/app/index.html ] && cp .next/server/app/index.html out/
# Fallback index
if [ ! -f out/index.html ]; then
echo '<!DOCTYPE html><html><head><script>location.href="/today";</script></head><body>Loading OpenSprout...</body></html>' > out/index.html
fi
working-directory: apps/web

- name: Sync Capacitor
run: npx cap sync android
working-directory: apps/web

- name: Build Android (debug)
run: cd android && ./gradlew assembleDebug
run: cd android && chmod +x gradlew && ./gradlew assembleDebug
working-directory: apps/web

- name: Upload APK
Expand Down
Loading