Docs · Automation

Automated builds with GitHub Actions

Web2APK compiles APKs on GitHub's runners — free, with the Android SDK pre-installed. Here's how it's wired and how to self-host it.

How it works

When you start a build, the platform dispatches a workflow_dispatch to a GitHub Actions workflow. The runner clones/extracts your source, runs the Capacitor + Gradle pipeline, signs the APK, and uploads it to storage — then the dashboard shows the result live.

Self-host the builder

The workflow lives at .github/workflows/build-apk.yml. To run it under your own GitHub account, set these repo secrets (Settings → Secrets and variables → Actions):

DATABASE_URL                # Postgres (pooled)
DIRECT_URL                  # Postgres (direct)
SUPABASE_URL                # https://<ref>.supabase.co
SUPABASE_SERVICE_ROLE_KEY   # service_role key
GH_SOURCE_TOKEN             # PAT with 'repo' scope (private source repos)

And on the web app (Vercel), set BUILD_DRIVER=github plus GITHUB_DISPATCH_TOKEN and GITHUB_BUILD_REPO. Full walkthrough: GITHUB_BUILDS_SETUP.md in the repo.

Private source repos

Private repos are cloned with a token — your code never goes public. Either set GH_SOURCE_TOKEN (a PAT with the repo scope), enable per-user access with GITHUB_OAUTH_SCOPE="read:user user:email repo", or simply upload your project as a ZIP (private, no token needed).

Free tier: public build repos get unlimited Actions minutes; private repos include 2,000 min/month (~250–500 builds). Beyond that, run the worker on Render/Fly with the same code.