Deploying from Git

Deploying from Git

Connect a repository, and klickops builds the image. Every push then becomes a deploy.

View .md Reviewed against 2026.9.10
On this page

What it is

klickops starts at the container image. A connected repository adds the step before that. klickops clones your code and builds an image from it. The image goes into klickops' own registry, and then it goes live. So a push to the branch you chose becomes a new running version.

klickops is not a CI system. There are no pipelines, stages or build matrices. You can't run your tests here. If you need that, keep your CI and let it push an image. klickops deploys that image just as well.

When you'd use it

  • You have a repository but no image, and you don't want to maintain a build workflow.
  • You want a push to main to reach production without a manual step.
  • You want an environment for each pull request, so you can look at a change before you merge.
Not this

Does your build need secrets, custom toolchains or tests that must pass first? Then the build belongs in your CI. Build there and push the image. Then point klickops at that image.

Connect a repository

  1. Open Repositories in the organization and connect your provider. GitHub uses an app installation, so klickops never sees a password.
  2. Pick the repository and its default branch.
  3. klickops looks at the code and suggests how to build it. Accept the suggestion or change it.

From then on, every project in the organization can use the repository. A second app from the same code needs no second connection.

Push to your branchklickops buildsImage in the registryNew version running

How it builds

BuilderWhen it is usedWhat it needs
BuildpacksDefault, when the repository has no Dockerfile.Nothing. klickops detects the language and builds a production image.
DockerfileThe repository has a Dockerfile, or you choose it.Your Dockerfile. klickops builds it exactly as written.

Builds run in the cluster. They run isolated and without root. The finished image goes into the registry that klickops runs. So your image stays on the platform, unless you set up a registry of your own.

Public keys in the build

Vite, Next.js and similar frameworks copy some environment variables into the site's JavaScript. This happens during the build, and every visitor downloads that JavaScript. So klickops passes these variables to the build. It passes every environment variable of the app whose name starts with VITE_, NEXT_PUBLIC_, PUBLIC_, NUXT_PUBLIC_, REACT_APP_ or EXPO_PUBLIC_. A secret never reaches a build.

klickops still leaves some keys out. That happens when the name contains SECRET, PRIVATE, SERVICE_ROLE or PASSWORD. It also happens when the value looks like a secret key, for example a Stripe key starting with sk_live_. Otherwise the site would show that key to every visitor. The build log names every key that klickops left out.

A Dockerfile build only sees a key if the Dockerfile declares it. For that you need a line like ARG VITE_SUPABASE_URL before the step that builds the site. If you change one of these keys on the app, klickops rebuilds the running version. Once it is live, the site shows the new value.

Watching a build

An app's Source tab lists the latest commits of its branch. Each commit shows whether it is live, building, built, failed or not built yet. Open a commit to see its builds and their logs. One click builds a commit and puts it live, also an older one. If a build fails, the current version keeps running. So a broken commit doesn't take production down.

The branch picker on the Source tab switches the branch the app follows. klickops then builds that branch's latest commit. Rescan reads the repository again and shows what changed since the app was set up: a new port, a key the code now needs, a database it expects.

Settings reference

SettingDefaultWhat it does
Branchthe repository's default branchPushes to this branch go live.
Subpathrepository rootBuilds from a subfolder. You need this for a monorepo.
BuilderbuildpacksSets how the image is built.
Previewsoff for a repository connected since October 2026Builds and starts an environment with its own address for each pull request. When the pull request closes, klickops removes it. Turn previews on or off in the app's Source tab, or with Deploy every pull request on the repository's page.

Limits and gotchas

  • Only pushes to the chosen branch go live. klickops only builds other branches when previews are on.
  • A build reuses the steps that did not change. klickops keeps them from the last build of the branch that goes live. When your dependencies change, the build runs again from that step on. Builds of other branches use these steps but never save their own.
  • A build gets 40 minutes and about 20 GB of disk. If it needs more, klickops stops it and the build fails. The running version stays. A failed build does not start again by itself. A build whose machine was taken away does start again.
  • An app in a JavaScript workspace builds from the repository root. When the subpath is a pnpm, yarn or npm workspace member with its own start script, klickops installs from the root's lockfile and runs that member's build and start scripts. A build or start command you set wins.
  • Submodules and Git LFS files are fetched. Submodules over HTTPS or SSH come along. The repository's credentials only reach its own host. A submodule elsewhere must be public, or its folder stays empty and the build log says so.
  • Each build has its own log. When a build disappears from the list, its log is gone too.
  • Previews cost money while they run. Each open pull request is a running environment. Twenty open pull requests are twenty environments. Pull requests from forks get no preview.
  • A preview uses the live data. It writes to the same database and buckets as the live app. Test with data you can lose.
  • A moved repository needs a new address. klickops doesn't follow your provider's redirects. Did you rename or move a repository? Then update its address under Repositories.
  • Apps: what goes live after a build.
  • Secrets: values the running app needs. There are no secrets at build time.