# Deploy

Ship your code. Pyvolt runs the whole pipeline over SSH on your server and streams the log live.

## Triggering a deploy

Two ways:

- **The Deploy button** - top right on every app page.
- **Push to deploy** - on by default: pushing to your configured branch deploys automatically. See [Push to deploy](../push-to-deploy.md).

Or from your terminal (add `--follow` to stream the log and exit non-zero on failure, handy in CI):

```cli
pyvolt deploy myapp.com
```

## What the pipeline does

1. **Fetch code** - clone on first deploy, `fetch` + hard reset to your branch after that, using the app's deploy key.
2. **Python runtime** - the right Python version is installed via [mise](https://mise.jdx.dev) and the virtualenv is (re)built. Changing the Python version in Settings rebuilds the venv on the next deploy.
3. **Install dependencies** - `uv sync`, `poetry install`, or `pip install -r requirements.txt`, per your package manager.
4. **Build** - your build command, if set (e.g. `npm ci && npm run build` for a frontend).
5. **Release command** - your explicit release steps, one per line, each shown as its own step in the log. For Django that's typically `collectstatic` and `migrate`. These are visible and editable in Settings - Pyvolt never runs framework magic you can't see.
6. **Restart** - the app's systemd service restarts, along with every [background process](../background-processes.md) so workers pick up the new code.

Every step streams into the Deployments tab. If a step fails, the deploy stops there and the failing output is right in front of you.

## Deploy history

The Deploy tab lists every deployment with its commit (short SHA + message), who triggered it - you, or "via push" - and its status. Click any row for its dedicated page - per-step sections with timings.

```cli
pyvolt deployments myapp.com
```

## Environment

Your app runs as a systemd service behind nginx:

| Component | How it runs |
|-----------|-------------|
| App | Your start command (gunicorn, uvicorn, …) on a unix socket |
| Static files / SPA frontend | Served directly by nginx |
| Database | PostgreSQL on your server |
| Cache / broker | Redis on your server |

Environment variables come from the [Env tab](../environment-variables.md).
