# Deploy

Rebuild a site hosted on velastack.dev with the latest published content and put it live.

### Syntax

```
$ vela cms deploy
$ vela cms deploy --project <id>
$ vela cms deploy --no-wait
```

A site velastack.dev hosts is a prebuilt copy of a template, so what editors publish in the hosted CMS reaches visitors only once the site is built again with that content. This command asks for that build, the same thing as **Deploy Site…** in the admin bar. Nothing is built or uploaded from your machine: velastack.dev runs the build, uploads the result and points the site's hostname at it.

### Requirements

- A site hosted on velastack.dev, as [`vela create`](/create) sets up from a CMS-ready template. A project deployed to a server with [`vela deploy`](/deploy) has no such site; it is updated by deploying again, and this command says so.
- A project to act on: the one [`vela link`](/link) recorded in `.vela/project.json`, or `--project <id>`. A site created from the dashboard has no checkout to link, so `--project` is how it is deployed from a terminal or CI.
- An API key. [`vela login`](/account/login) stores one, and `VELA_API_KEY` in the environment is what CI uses.

### Waiting

The command waits for the build, polling every few seconds, and exits once the site is live or the build has failed. A failed build prints its error and exits with status 1. Only one deploy of a site runs at a time; run while one is building, the command reports that and waits for it instead of starting another. A build that has not finished after thirty minutes is left to finish on its own, and the project's deployments page on velastack.dev shows how it ends.

### Options

- `--project <id>` - velastack.dev project whose site to rebuild, instead of the linked one
- `--no-wait` - Return once the build has started instead of waiting for it

### Deploy history

Every rebuild appears on the project's deployments list on velastack.dev, next to deploys from the admin bar and from `vela deploy`, with who started it and whether it succeeded.

### See also

- [`vela enable cms`](/enable/cms) - Add the CMS to a project
- [`vela deploy`](/deploy) - Deploy an app to a server
- [`vela link`](/link) - Link a checkout to a velastack.dev project