---
titel_en: Deploy from GitHub: every push goes live
titel_nl: Deployen vanuit GitHub: elke push gaat live
categorie: deploy
bundels: website
geverifieerd_op: 2026-11-25
bewijs: lib/github-koppeling.ts, lib/github-app.ts, app/api/github/webhook/route.ts, app/portal/sites/[id]/github/page.tsx, scripts/github-koppeling-test/asserts.mjs, lib/github-bewijs.ts
zoekwoorden: github, git, push, repository, branch, webhook, github app, workflow, action
---
## en
Your site lives in a repository on GitHub? Connect it, and every push to the branch you pick goes live. No workflow, no token, nothing to keep. It is free.

### How it works
1. Open your site in the portal and go to the GitHub tab.
2. Click "Install the Dorelli app on GitHub". On GitHub you choose the account and which repositories the app may read. It only reads; it cannot change anything in your repository. The first time, GitHub then asks whether Dorelli Cloud may see who you are. That is how we know the installation is yours: only the person who installed the app can connect it to a site.
3. Back in the portal, pick the repository, the branch and the folder with your site. You can leave the folder empty: we find the folder with index.html ourselves.
4. Click "Connect and publish". The branch goes live right away, and from now on every push to it does too.

GitHub sends us a message on each push. We fetch the files of that commit, keep what a site can hold (HTML, CSS, images, fonts, scripts) and leave out the rest, such as README.md, package.json and the .github folder. The new version goes through the same checks as an upload, and the previous version stays online until the new one is in.

### A new site straight from GitHub
No site yet? On the dashboard of the portal, click "New site from GitHub". Pick the repository; the address comes from its name, and you can change it. The site is yours right away and the branch goes live. Everything else works the same as above.

### Previews per branch and pull request
Push to another branch than the connected one, and that branch gets its own address, such as dorelli-pv12-feature-x.dorelli.cloud, after the same check as an upload. Open a pull request and it gets a comment with the link; every push to the pull request updates the preview, and GitHub shows it as a deployment. A preview goes away when the branch or the pull request is closed, after fourteen days without a push, or when you remove it on the GitHub tab. At most ten per site. A pull request from a fork gets no preview. Turn previews off on the GitHub tab if you do not want them.

### A site with a build step
Does your folder have no index.html but a package.json? Then the repository needs a build first, with Vite, Astro, Next or another tool. A Vite or Astro project with an index.html in the root counts as a build too: that index.html is the source, not the site. We do not build on our server; GitHub does, on the minutes of your own GitHub account. The GitHub tab then shows a workflow file, with the output folder guessed from your package.json. The button "Put the workflow on GitHub" opens it in your repository, ready to commit; or put it there yourself as .github/workflows/dorelli.yml. Every push builds the site on GitHub and publishes it with the id token of the run, because the connection already binds your site to the repository. No deploy token needed.

### Settings in your repository
Put a dorelli.json in the root of the repository and it decides at every push: `folder` (the folder with the site), `output` (the output folder of a build) and `previews` (true or false). It goes before what you set in the portal, and all three are optional. A dorelli.json that is not valid JSON stops the push with the reason on the GitHub tab.

### Several sites from one repository
Connect each site to its own folder in the repository. A push that changes nothing in a site's folder leaves that site as it is: the commit gets a green check that says so, and the GitHub tab lists it as unchanged.

### A message in Slack, Discord or your own tool
On the Agents tab you can add a webhook for the events "push from GitHub" and "preview from GitHub". A Slack or Discord webhook address gets a readable message; any other address gets our JSON with the branch, the commit, the outcome and the address.

### Good to know
- One repository per site, and one branch. Pushes to other branches do nothing.
- At most 50 MB and 500 files, like an upload.
- A site without a subscription publishes from GitHub at most 20 times an hour, and builds at most 20 previews an hour, counted per GitHub installation. When many publications run at once, a push waits its turn, up to five minutes.
- "Publish now" in the portal fetches the branch without waiting for a push.
- "Disconnect" stops it. A push then no longer changes your site, and runs of GitHub Actions no longer publish with their id token either.
- Remove the app from your GitHub account and the connection stops too; the portal says so.
- Installed the app before, but it does not show in the portal? On the GitHub page of the portal, click "I already installed the app". After a check on GitHub, every installation you made yourself and that is not linked yet comes to your account.
- The outcome also shows on the commit on GitHub, as the status dorelli/site: a green check when it is live, a red cross with the reason when it is not.
- A push that was refused or failed gets you a mail, once per kind of failure. Your previous version stays online.
- Two pushes right after each other: only the newest is published.
- The GitHub tab lists your last pushes with what each one did. "Put back" puts an earlier version online again, after the same check as an upload.
- The first push that goes live gets you a mail with the address, once per connection.
- The badge on the GitHub tab shows in your README whether the last push is live.
- The connected branch also shows on GitHub as the deployment "production", with "View deployment" on the commit.
- Your code stays on GitHub. We read a repository only when you push or press "Publish now", and we store nothing of it but the published site.

## nl
Staat je site in een repository op GitHub? Koppel hem, en elke push naar de tak die je kiest gaat live. Geen workflow, geen token, niets om te bewaren. Het is gratis.

### Zo werkt het
1. Open je site in het portaal en ga naar de tab GitHub.
2. Klik op "Installeer de Dorelli-app op GitHub". Op GitHub kies je het account en welke repositories de app mag lezen. Hij leest alleen; hij kan niets in je repository veranderen. De eerste keer vraagt GitHub daarna of Dorelli Cloud mag zien wie je bent. Zo weten we dat de installatie van jou is: alleen wie de app installeerde, kan hem aan een site koppelen.
3. Terug in het portaal kies je de repository, de tak en de map met je site. De map mag leeg blijven: wij zoeken de map met index.html dan zelf.
4. Klik op "Koppelen en publiceren". De tak gaat meteen live, en vanaf nu elke push ernaar ook.

GitHub stuurt ons bij elke push een bericht. We halen de bestanden van die commit op, houden wat een site kan bevatten (HTML, CSS, afbeeldingen, lettertypen, scripts) en laten de rest weg, zoals README.md, package.json en de map .github. De nieuwe versie gaat door dezelfde controles als een upload, en de vorige versie blijft online tot de nieuwe erin staat.

### Een nieuwe site rechtstreeks vanuit GitHub
Nog geen site? Klik op het dashboard van het portaal op "Nieuwe site vanuit GitHub". Kies de repository; het adres komt van de naam, en je kunt het aanpassen. De site is meteen van jou en de tak gaat live. Verder werkt alles zoals hierboven.

### Previews per tak en pull request
Push naar een andere tak dan de gekoppelde, en die tak krijgt een eigen adres, zoals dorelli-pv12-feature-x.dorelli.cloud, na dezelfde controle als een upload. Open een pull request en die krijgt een reactie met de link; elke push op de pull request werkt de preview bij, en GitHub toont hem als deployment. Een preview gaat weg als de tak of de pull request dicht gaat, na veertien dagen zonder push, of als je hem op de tab GitHub weghaalt. Hoogstens tien per site. Een pull request uit een fork krijgt geen preview. Zet previews uit op de tab GitHub als je ze niet wilt.

### Een site met een bouwstap
Staat er in je map geen index.html, maar wel een package.json? Dan moet de repository eerst gebouwd worden, met Vite, Astro, Next of een ander gereedschap. Een Vite- of Astro-project met een index.html in de wortel telt ook als bouwstap: die index.html is de bron, niet de site. Wij bouwen niet op onze server; GitHub doet dat, op de minuten van je eigen GitHub-account. De tab GitHub toont dan een workflowbestand, met de uitvoermap geraden uit je package.json. De knop "Zet de workflow op GitHub" opent hem in je repository, klaar om te committen; of zet hem er zelf in als .github/workflows/dorelli.yml. Elke push bouwt de site op GitHub en publiceert hem met het id-token van de run, want de koppeling bindt je site al aan de repository. Geen deploy-token nodig.

### Instellingen in je repository
Zet een dorelli.json in de wortel van de repository en die beslist bij elke push: `folder` (de map met de site), `output` (de uitvoermap van een bouwstap) en `previews` (true of false). Hij gaat voor op wat je in het portaal instelt, en alle drie zijn vrijwillig. Een dorelli.json die geen geldige JSON is houdt de push tegen, met de reden op de tab GitHub.

### Meerdere sites uit een repository
Koppel elke site aan een eigen map in de repository. Een push die niets in de map van een site verandert, laat die site zoals hij is: de commit krijgt een groen vinkje dat dat zegt, en de tab GitHub noemt hem ongewijzigd.

### Een bericht in Slack, Discord of je eigen tool
Op de tab Agents zet je een webhook voor de gebeurtenissen "push vanuit GitHub" en "preview vanuit GitHub". Een webhookadres van Slack of Discord krijgt een leesbaar bericht; elk ander adres krijgt onze JSON met de tak, de commit, de uitkomst en het adres.

### Goed om te weten
- Eén repository per site, en één tak. Een push naar een andere tak doet niets.
- Hoogstens 50 MB en 500 bestanden, net als een upload.
- Een site zonder abonnement publiceert vanuit GitHub hoogstens 20 keer per uur, en maakt hoogstens 20 previews per uur, geteld per GitHub-installatie. Lopen er veel publicaties tegelijk, dan wacht een push op zijn beurt, tot vijf minuten.
- "Nu publiceren" in het portaal haalt de tak op zonder op een push te wachten.
- "Ontkoppelen" zet het stop. Een push verandert je site dan niet meer, en runs van GitHub Actions publiceren ook niet meer met hun id-token.
- Haal je de app van je GitHub-account, dan stopt de koppeling ook; het portaal zegt het.
- Installeerde je de app al, maar staat hij niet in het portaal? Klik op de GitHub-pagina van het portaal op "Ik heb de app al geïnstalleerd". Na een controle bij GitHub komt elke installatie die je zelf maakte en die nog nergens aan hangt in je account.
- De uitkomst staat ook op de commit op GitHub, als de status dorelli/site: een groen vinkje als hij live is, een rood kruis met de reden als het niet lukte.
- Een push die geweigerd werd of mislukte levert je een mail op, een keer per soort mislukking. Je vorige versie blijft online.
- Twee pushes vlak na elkaar: alleen de nieuwste wordt gepubliceerd.
- De tab GitHub toont je laatste pushes met wat elke push deed. "Terugzetten" zet een eerdere versie weer online, na dezelfde controle als een upload.
- De eerste push die live gaat levert je een mail op met het adres, een keer per koppeling.
- De badge op de tab GitHub laat in je README zien of de laatste push live staat.
- De gekoppelde tak staat op GitHub ook als deployment "production", met "View deployment" bij de commit.
- Je code blijft op GitHub. We lezen een repository alleen als je pusht of op "Nu publiceren" drukt, en we bewaren er niets van behalve de gepubliceerde site.
