GitHub
Connect a repository once: every push deploys, every pull request gets its own URL.
Connect a repository once, and you stop deploying by hand. Every push to the branch you chose builds and goes live on your domains. Every pull request builds too, on an address of its own, so a change can be looked at before it is merged — and the address is posted back to the pull request.
Connecting
- In the console, open your project → Settings → GitHub.
- Choose Connect GitHub. GitHub asks which repositories to grant — pick only the ones you want deployed. You can change that list later, on GitHub, without coming back here.
- Pick a repository, confirm the branch that serves production, and decide whether pull requests get previews.
Private repositories work: each build clones with a token that nesly asks GitHub for at build time and that expires within the hour. nesly never asks for your GitHub password and never holds a personal access token.
What happens on each event
| On GitHub | Here | What that means |
|---|---|---|
| Push to the connected branch | Production deploy | Your domains serve the new build once it is ready. The previous deployment stays reachable at its own URL. |
| Pull request opened or updated | Preview deploy | A build of that branch on its own address, commented on the pull request. |
| Pull request closed or merged | Preview stopped | The preview URL stops answering and the workload is removed. |
| Push to any other branch | Nothing | Only the connected branch deploys to production. |
| Pull request from a fork | Nothing | A fork's code is written by someone with no write access to the repository. Building it would run that code with your environment variables, under your name. |
Previews
A preview is a full deployment of the pull request's branch, built exactly the way production is built — same commands, same environment variables. It gets its own permanent address and it never takes over your project's domains, however green it is.
The pull request carries one comment, edited on every push rather than repeated, and the commit carries a status you can see from the pull request's checks. When the pull request is closed or merged, the preview is taken down.
What nesly asks GitHub for
| Contents | Read | Clone the repository to build it. |
| Metadata | Read | List the repositories you granted, so you can pick one. |
| Commit statuses | Write | The green check next to your commit. |
| Pull requests | Write | One comment with the preview URL, updated in place. |
That is the whole list. No access to your organisation's members, your other repositories, your Actions secrets, or anything you did not grant. Everything is revocable from your own GitHub settings, and revoking it there unlinks the projects here.
From the terminal
Deployments made by a push look like any other deployment, and say which pull request they belong to:
nesly ls
nesly inspect dep_... # Preview of: pull request #7
nesly logs # the build output of the last deployment
How the build itself is configured — the directory, the commands, the output — is on the builds page, and is the same for pushes, pull requests and nesly deploy.
When a push does not deploy
- The branch is not the connected one. Only the branch you chose deploys to production; change it in the console.
- The pull request comes from a fork. Deliberate — see the table above.
- The repository was removed from the installation. Add it again on GitHub; the project reconnects on the next push.
- GitHub keeps a delivery log for the app under your repository's settings. Every delivery gets an answer saying what was done and, when nothing was, why.