Docs/GitHub Integration

GitHub Integration

Automatic deployments from git push, private repo access, and webhook configuration.

Authentication

Launchmatic uses GitHub OAuth to authenticate users. When you sign in, we request read access to your repositories and email. For private repositories, Launchmatic generates a short-lived installation access token scoped to the specific repo — we never store your GitHub password or personal access tokens.

Auto-deploy on push

When a service is connected to a GitHub repository, pushes to the configured branch automatically trigger a new deployment. The flow:

PushYou push a commit to the configured branch (e.g. main).
WebhookGitHub sends a push event to the Launchmatic API via webhook.
MatchLaunchmatic matches the repo and branch to one or more services.
BuildA build job is enqueued. The code is cloned at the pushed commit SHA.
DeployOn success, the new image is rolled out. The old pods drain gracefully.

Webhook configuration

Launchmatic automatically manages webhooks when you connect a repository. If you need to configure manually:

URLhttps://api.launchmatic.io/webhooks/github
Typeapplication/json
EventsPush events only
SecretSet in GITHUB_WEBHOOK_SECRET env var

Private repositories

Launchmatic clones private repositories using short-lived GitHub installation tokens. The token is generated at clone time, scoped to the specific repository, and expires within an hour. The token is never persisted to disk or logged.

Monorepo support

For monorepos, set the Root Directory when creating a service (e.g. apps/web). Launchmatic will build from that subdirectory. Multiple services can point to different directories in the same repo.

Branch configuration

By default, Launchmatic deploys from the repository's default branch (usually main). You can change the branch in your service settings. Only pushes to the configured branch trigger auto-deployments.