Deploy from CLI

The CLI pushes your local project to a preview, then deploys it to an environment, in a terminal or in CI.

Before you start

You need a project on your machine, pulled from Studio or made with npm create veryfront. See Work locally.

Deploy from the terminal

  1. If the project isn't on Veryfront yet, create it and publish its preview. up links or creates the project and pushes main:
    Shell
    npx veryfront up
  2. After you change files, update the preview:
    Shell
    npx veryfront push
  3. Deploy to an environment:
    Shell
    npx veryfront deploy --env staging
  4. Read the output. You should now see Deployed … to staging and the release's version.

In CI there is no browser to sign in with: set VERYFRONT_API_KEY to an API key and run the same commands. deploy without --env targets production.

Next steps