To deploy a site, you create a project: one branch of one Git repository, which the app keeps a copy of in its storage folder. Your site's document root points into that copy through a symlink. To deploy two branches of the same repository, such as main to your live site and staging to a test subdomain, create a project for each. They share the repository's deploy key and webhook. See Repositories.
On the Projects page, choose Create new project and fill in:
https://github.com/you/site.git, for public repositories.git@github.com:you/site.git or ssh://git@github.com/you/site.git, for private repositories. These need a deploy key.main.The project is named after the repository, such as site for the addresses above. You can rename it in its settings. The repository address and branch can't be changed later. To deploy a different branch or move to a different address, create a new project and delete the old one.
A new project starts as Not cloned, and nothing is deployed until you clone it. The exception is a repository that already has a webhook on GitHub: the next push to the project's branch clones and deploys the project for you.
The Overview shows the project's status. On the Projects page, a project's card carries a badge only when it is Not cloned or Failed.
A project becomes Failed when Git can't clone the repository or bring the branch up to date, or when the .env file can't be written. Other problems are logged, but the deploy carries on and the project stays Cloned:
Warning: Failed to create symlink.
Read the log after changing symlinks or commands.
Each project has four tabs:
On a new project's Overview, choose Clone Repository. The app downloads the latest commit of the branch, without the rest of its history, along with any Git submodules. Then it runs the rest of the deploy: it writes the .env file, creates the symlinks and runs your commands. See Deployment for each step.
If cloning fails, the Overview shows an error and offers Pull Latest Changes to try again. With no copy to pull into yet, that button clones. Common causes are a mistyped address, a branch that doesn't exist, or a private repository without a deploy key.
Choose Pull Latest Changes on the Overview to deploy by hand. The app fetches the branch and merges the new commits into its copy, updates the submodules, then runs the rest of the deploy as it does after a clone. Pushes deploy the same way once you've set up a webhook.
The page waits for the pull to finish, which takes longer when your commands build something. Afterwards, the Overview shows the new latest commit.
Before a pull, the app checks its copy of the repository. If something is in the way, it stops and shows a dialog with what it found, a Force sync (discard local changes) checkbox and one button. The button reads Continue Pull until you tick the checkbox, then Force Sync.
The dialog has one of two titles:
.gitignore covers, such as vendor or node_modules, and the app's .env file are kept.Force Sync can delete your site's data. Uploads, caches and anything else the site wrote into its folder are gone afterwards, unless your .gitignore covers them. Read the list in the dialog first. To stop the app asking, add those paths to .gitignore in the repository.
The app only learns that a branch was rewritten when it fetches. So the first pull after a force push doesn't ask: it normally fails, and the project shows Failed. Choose Pull Latest Changes again and the Branch Has Diverged dialog appears.
Deploys started by a webhook never ask. They only move the branch forward: if it has diverged, or changed files are in the way, the deploy fails with the reason in the log, and you decide what to do from the Overview.
If you start a pull while another deploy of the same project is running, such as one started by a push, the app refuses it with "Another deployment is already running for this project". Try again when the other deploy has finished. Pushes that arrive during a deploy wait for it instead, and several waiting pushes are deployed together in one pass. Different projects can deploy at the same time.
In the project's Settings, choose Delete Project. The app removes the project's symlinks, its copy of the repository, its logs and its settings. That takes the site offline, since its document root was one of those symlinks.
The repository record stays, with its deploy key and webhook secret. If you create a project for the same repository again, it picks them up, and the deploy key and webhook on GitHub keep working. To remove those too, see Repositories.