Projects

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.

Create a project

On the Projects page, choose Create new project and fill in:

  • Repository URL, in one of these forms:
    • HTTPS, such as https://github.com/you/site.git, for public repositories.
    • SSH, such as git@github.com:you/site.git or ssh://git@github.com/you/site.git, for private repositories. These need a deploy key.
  • Branch: the branch to deploy. Leave it empty for 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.

Statuses

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.

  • Not cloned: the project exists, but the app hasn't downloaded the repository yet.
  • Cloned: the last clone or pull finished.
  • Failed: the last clone or pull failed. The Overview links to the project's logs, which show why.

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:

  • A command that exits with an error, or submodules that can't be updated during a pull. The deploy's log gets a red dot in the Logs tab.
  • A symlink that can't be created. The log keeps its green dot, so look in it for a line starting with Warning: Failed to create symlink.

Read the log after changing symlinks or commands.

The project page

Each project has four tabs:

  • Overview: the status, the repository and branch, the site's URL if one of the project's symlinks has one, and the latest deployed commit with its hash, message, author and date. Clone and pull from here.
  • Logs: one log for each deploy, and for each change you make in the project to its environment variables, symlinks or deploy key. See Logs.
  • Deployment: the environment variables, symlinks and commands each deploy applies. See Deployment.
  • Settings: the name, the deploy key, the webhook setup, and deleting the project.

Clone the repository

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.

Pull the latest changes

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.

When the app asks before pulling

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:

  • Working Tree Has Changes: files in the app's copy differ from the last commit, or files have appeared that Git neither tracks nor ignores. The usual causes are a site that writes uploads, caches or sessions into its own folder, a command that rewrites a file that is in Git, and edits made directly on the server. The dialog lists the changed files and the ones a force sync would remove.
    • Continue Pull pulls anyway and leaves those files alone. Git stops with an error only when the incoming commits touch the same files.
    • Force Sync discards the changes, resets the copy to the branch as it is in the repository and deletes every file Git neither tracks nor ignores. Files your .gitignore covers, such as vendor or node_modules, and the app's .env file are kept.
  • Branch Has Diverged: the branch in the repository no longer continues from the commit the app has, which usually happens after a force push or a rewritten history. The checkbox is ticked and locked, so the only way forward is Force Sync.

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.

One deploy at a time

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.

Delete a project

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.