# 3\. Deploy with Git

Commit your application source, `Cargo.toml`, `Cargo.lock`, and `leilani.json` to your local `main` branch. Run these commands from the project directory, replacing `WORKSPACE-ID`:

```bash
git remote add leilani https://leilani.dev/git/WORKSPACE-ID
git push leilani main
```

When Git requests credentials, use your workspace ID as the username shown on **Deploy** and the password you created in Leilani. Add the remote once; use the push command for later deployments.

A push that updates `main` triggers a build. Watch the output in your terminal and check the status on Deploy. When Deploy reports the package as running, open `https://WORKSPACE-ID.aloha.leilani.dev`. Running means the process started; Leilani has not checked its HTTP response. Confirm the page or API response is what your application should return.

Leilani builds all Cargo workspace members in release mode with a locked dependency graph. Commit an up-to-date `Cargo.lock`; a build that needs to change it will fail. See the [build reference](https://leilani.dev/docs/builds.md) for compiler settings and caching.

If the request fails, check Deploy for process status, then Logs for startup output. Compare the application’s actual listening address and port with `http.binds`.

To deploy changes, commit them and push again. Pushing another branch does not deploy it.
