# Deploy from GitHub

Connect a GitHub repository when GitHub should stay the source of truth for your code. Tokay follows one branch and prepares each new commit without changing how your team works in GitHub. The Project setting decides whether the prepared update deploys automatically or waits for you.

## Connect the repository

1. Open **New Service**, then choose **Connect GitHub**.
2. Authorize Tokay. Install the **GitHub App** for durable team access, or use **personal GitHub access** when you cannot install apps on the repository.
3. Choose the repository, or enter `owner/repo` if it is not listed.
4. Tokay mirrors the repository and detects the Services it can run.
5. Review the detected setup and deploy the Service you want.

Tokay follows the branch you select. Commits to other branches do not deploy.

## GitHub stays in control of the code

You continue editing locally or on GitHub. The source view in Tokay is read only because GitHub is the editable home of the repository.

Tokay keeps a mirror for builds and deployment. We do not need write access to your GitHub code. GitHub notifies Tokay when a commit arrives, and Tokay also checks for updates so a missed notification delays a deploy rather than losing it.

## Disconnect without taking the app down

Disconnecting stops the GitHub relationship but does not stop the running Services. Tokay keeps the latest mirror as a Tokay hosted repository, and the original repository on GitHub is unchanged.

See [Editing your code](editing-your-code.md) for how the editable home changes between pasted code, Tokay hosted git, and GitHub.
