# Deploy from Git

> Connect a repository — veldhost Git, GitHub or GitLab — and deploy on every push.

Source: https://veldhost.eu/docs/deploy-from-git

Connect a repository once and ship by pushing code. Works with veldhost Git, GitHub, GitLab, or any git host.

## Set it up

1. Site → Files tab → **Deploy from Git**.
2. Enter the repository:
  - `you/repo` for veldhost Git,
  - `https://github.com/you/repo` for public repos,
  - `git@github.com:you/repo.git` for private ones.
3. Pick the branch and press **Deploy from Git**. We clone, build the frontend (npm), install dependencies (Composer), run migrations and publish.

## Private repositories

After your first attempt the card shows your site's **deploy key**. Add it in your repo settings (GitHub: Settings → Deploy keys; GitLab: Settings → Repository → Deploy keys), then deploy again. Read-only, one key per site.

## Deploy on every push

The card also shows a **webhook URL + secret**. Add them as a push webhook in your repo and every push to your chosen branch deploys automatically — no portal visit.
