Skip to content

chore: configure static export in next.config and ensure assets direc… #3

chore: configure static export in next.config and ensure assets direc…

chore: configure static export in next.config and ensure assets direc… #3

Workflow file for this run

name: Build Android APK
on:
push:
branches:
- main
pull_request:
branches:
- main
workflow_dispatch: # Allows manual triggering of the workflow
jobs:
build-android:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup Java
uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: '17'
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '22'
- name: Install pnpm
uses: pnpm/action-setup@v3
with:
version: 9
- name: Install dependencies
run: pnpm install
- name: Build Next.js app
run: pnpm run build
env:
# Add any environment variables needed for the build here
NODE_ENV: production
- name: Sync Capacitor Android
run: |
mkdir -p android/app/src/main/assets/public
npx cap sync android
- name: Build APK
working-directory: ./android
run: |
chmod +x ./gradlew
./gradlew assembleDebug
- name: Upload APK Artifact
uses: actions/upload-artifact@v4
with:
name: app-debug
path: android/app/build/outputs/apk/debug/app-debug.apk