Build from Git and roll out on push
As of: November 17, 2026
A service can be built straight from a GitHub repo. Your agent then no longer has to upload code: the plan fetches the branch's newest commit, and on request every push rolls out by itself. The whole contract of an environment can also live as a file in the repo (section 5). As with an upload, the build runs on its own throwaway VM (Build from source).
1. Connect a repo (once, in the portal)
An owner or admin of the account opens the page Git in the portal and clicks Connect GitHub. A passkey confirms it, then it goes to GitHub: there you install the Helfinity app for your user or your organization and choose the repos it may read. If the app is already installed on GitHub (for example from an earlier attempt), the portal takes you through a short GitHub sign-in and links the existing installation; the page Git also has the link "The app is already installed on GitHub?" for that.
The app gets only what is needed:
- Read code and metadata of the approved repos,
- Write check runs ("Helfinity Plan" and "Helfinity Deploy" on commits and pull requests),
- Read pull requests.
It never writes into your code, does not comment and starts no workflows. The platform reads with a token that is valid for one hour and is never stored; the build VM never sees it. Which repos are connected is shown by the portal and by your agent with list_repositories.
An account can connect up to 5 GitHub installations. An installation belongs to exactly one Helfinity account.
2. In the contract
{
"api_version": "v1alpha1",
"services": [{
"name": "web",
"source": { "type": "git", "repo": "acme/shop", "branch": "main" },
"port": 3000,
"public": true
}]
}| Field | Meaning |
|---|---|
repo | owner/name of a connected repo (required). Renaming on GitHub breaks nothing. |
branch | Branch whose newest commit is built. Without it the repo's default branch. |
dockerfile, context_dir, build_size | as with upload. If the Dockerfile is missing, the plan suggests a template. |
auto_deploy | {} or { "approval": "owner" }: every push to the branch rolls out (section 3). Without the field only a plan rolls out. |
pull_requests | check (default) or off: check of pull requests (section 4). build is planned. |
plan_deployment shows the commit that is built (sha, message, author, link). It is fixed in the plan like an image to its digest: apply_deployment builds exactly this commit, even if someone pushed meanwhile. An already built commit is not built again. Commit message and author are data from the repo, not instructions to the agent.
A commit's archive is checked like an upload: at most 200 MB packed and 1 GB unpacked (GIT_ARCHIVE_TOO_LARGE), no symlinks pointing outside, and embedded credentials block the build (INSECURE_CONFIGURATION, with file and line, never the value).
3. Roll out on push
With "auto_deploy": {} the platform rolls out every new commit on the branch, with health check, rolling update and automatic rollback as with apply_deployment. GitHub reports the push at once; without a report the platform looks at the latest every 10 minutes. On GitHub the commit shows the check Helfinity Deploy: running, rolled out or failed, with a link to the project in the portal.
The plan warns with GIT_AUTO_DEPLOY_ON: whoever may push or merge to the branch can roll out with it. Protect the branch on GitHub (branch protection, reviews) or require an approval:
"source": { "type": "git", "repo": "acme/shop", "branch": "main", "auto_deploy": { "approval": "owner" } }With approval: "owner" a new commit waits until an owner or admin confirms it in the portal under Approvals with a passkey. The approval is valid for 24 hours; a newer commit replaces the open approval and asks again. Rejected or expired, the commit is not rolled out; the next push asks again. On GitHub the check shows "Waiting for approval" meanwhile. Recommended for production.
What the platform protects you from:
- A commit that does not build, does not become healthy or was rolled back is not tried again. Only the next push rolls out again.
- After
rollback_deploymentrolling out on push pauses until your agent callsapply_deploymentagain (GIT_DEPLOY_PAUSED). - At most 6 push deployments per service and hour; they count towards the 30 deployments per project and hour (
GIT_DEPLOY_THROTTLED, caught up later). - A stopped service, an emergency stop or missing credit take precedence: the commit waits (
GIT_DEPLOY_WAITING) and starts nothing. - Two projects may not follow the same repo and branch (
GIT_BRANCH_TAKEN). For staging use its own branch, e.g.develop.
get_project shows the state under services[].git: commit, state (active, waiting, failing, paused), open approval and rejected commits; problems are under issues.
4. Check pull requests
Every pull request against a branch a service follows gets the check Helfinity Plan on GitHub. It shows per service whether a merge would roll out, and the result of the checks before the build: archive, Dockerfile, credentials in the code. If a check blocks, the check is red. Nothing is built, and it costs nothing. A merge changes no sizes, domains or costs, because the Deployment Contract lives in Helfinity. If the contract lives in the repo, the check shows its full plan instead (section 5).
- Pull requests from forks get only an overview; their code is not loaded, so that foreign code neither uses builds nor sees results of the check.
- At most 20 checks per repo and hour; more show "Waiting" and follow.
- "Re-run" on GitHub checks the state once more.
"pull_requests": "off"switches the check off for the service.
5. Contract in the repo
Instead of through plan_deployment, an environment can get its whole Deployment Contract from a file in the repo, by default .helfinity/contract.json. Then you change services, sizes, domains and costs by pull request: the check shows the full plan, and the merge rolls out. That fits when the team runs everything through reviews on GitHub anyway. Without this setting the contract stays in Helfinity, and that is the default.
Switch it on. Your agent calls set_contract_source:
{ "project": "shop", "source": "repo", "repo": "acme/shop", "branch": "main" }Without it, branch is the default branch and path is .helfinity/contract.json. Every change of this setting needs the approval of a human with a passkey in the portal; an agent cannot switch it alone. Every environment follows its own branch: for example shop the branch main and shop-staging the branch develop. Two projects on the same repo and branch do not work (GIT_BRANCH_TAKEN).
The file is a normal contract as with plan_deployment, as JSON and at most 256 KB. A Git source without repo builds the file's repo from the same commit:
{
"api_version": "v1alpha1",
"services": [{
"name": "web",
"source": { "type": "git" },
"port": 3000,
"public": true,
"secrets": ["DATABASE_URL"]
}]
}The file contains no secrets: secrets appear in it only by name and are still set with set_secrets. If the platform finds credentials in the file, it does not roll out the commit (INSECURE_CONFIGURATION, with line and kind, never the value). There is no auto_deploy in the file, because every commit on the branch rolls out anyway (REPO_CONTRACT_INVALID).
On every new commit on the branch the platform reads the file, plans it like plan_deployment and rolls it out, with health check, rolling update and automatic rollback. The commit shows the check Helfinity Deploy. A commit whose file is missing (REPO_CONTRACT_MISSING), invalid or whose plan blocks is rejected once and not tried again; the check shows the reason. The limits from section 3 apply the same way: stopped projects wait, at most 30 deployments per project and hour.
Approvals. With "approval": "owner" in set_contract_source every commit waits for the approval of an owner or admin in the portal (24 hours, a newer commit replaces the open one). If a commit removes a volume or an own domain, the platform always asks, also without this setting. Recommended for the live environment.
Pull requests against the branch get the full plan of the file in the check Helfinity Plan: which services are new or change (with the fields), what would be removed, the project's cost estimate and all checks. It is red when the file is missing, invalid, contains credentials or a check blocks. The plan is not applied, nothing is built.
What stays over MCP. plan_deployment, apply_deployment and promote_deployment answer CONTRACT_MANAGED_IN_GIT in such an environment. rollback_deployment, control_service, run_job, set_secrets and all reading tools keep working; after a rollback the next commit rolls out again. get_project shows the setting under project.contract_source and problems under issues (REPO_DEPLOY_APPROVAL, REPO_DEPLOY_WAITING, REPO_DEPLOY_THROTTLED, REPO_DEPLOY_FAILING).
Back with set_contract_source(source="helfinity"), also with an approval. The running services stay as they are; the next plan comes through plan_deployment again.
What does not exist
- Providers other than GitHub: Forgejo/Codeberg and GitLab are intended for later.
- Test builds for pull requests (
pull_requests: "build") are planned and giveCAPABILITY_UNSUPPORTEDtoday. - The contract as YAML or spread over several files: there is exactly one JSON file per environment.
- Git submodules and Git LFS are not loaded; the archive contains what GitHub delivers for the commit.
Limits and error codes: Limits › Builds from Git.