Dev

Deploying

Deploy Nitrogen storefronts to Nova — automatic GitHub deploys, deploy tokens for CI/CD, and preview environments.

Nitrogen storefronts deploy to Nova, CloudCart's edge hosting. There are two paths; both give you production + preview environments.

GitHub auto-deploy

When a storefront is connected to GitHub (see Quickstart), deployments are fully automatic:

Push toResult
mainProduction deployment on your storefront URL
any other branchPreview deployment on a separate preview URL

The GitHub Actions workflow and deploy secrets are pre-configured by the starter template — there is nothing to set up.

Deploy token (CI/CD or manual)

In CI/CD or manual mode the admin gives you a deploy token starting with cc_nova_:

Deploy token screen

The token is shown once

Save it immediately as a CI secret. Anyone holding this token can deploy to your storefront — treat it like a password. If it leaks, rotate it from Storefront Settings.

The CLI looks for the token in this order:

  1. --token flag
  2. CLOUDCART_NOVA_TOKEN in your environment or .env file
  3. The token stored by cloudcart nitrogen link

Deploy commands

# Production deploy (builds first)
cloudcart nitrogen deploy

# Preview deploy — safe to run from feature branches
cloudcart nitrogen deploy --preview

# Skip the build step (you already ran nitrogen build)
cloudcart nitrogen deploy --no-build

# Explicit token (e.g. in CI)
cloudcart nitrogen deploy --token $CLOUDCART_NOVA_TOKEN

CI examples

name: Deploy storefront
on:
  push:
    branches: [main]
jobs:
  deploy:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: actions/setup-node@v4
        with: { node-version: 20 }
      - run: npm ci
      - run: npx @cloudcart/cli nitrogen deploy
        env:
          CLOUDCART_NOVA_TOKEN: ${{ secrets.CLOUDCART_NOVA_TOKEN }}
deploy:
  image: node:20
  only: [main]
  script:
    - npm ci
    - npx @cloudcart/cli nitrogen deploy
  variables:
    CLOUDCART_NOVA_TOKEN: $CLOUDCART_NOVA_TOKEN

Environment variables

Each storefront has its own environment configuration, managed on the store and synced with the CLI:

cloudcart nitrogen env pull    # store → local .env
cloudcart nitrogen env push    # local .env → store
cloudcart nitrogen env list    # list environments

env pull is the canonical way to get the Storefront API token into a fresh clone — never commit .env to Git.

Checking a deployment

After a deploy, the storefront page in the admin shows the environment status (production and previews) with links to each deployment. The storefront serves on https://<name>-<id>.cloudcart.dev until you attach a custom domain in Storefront Settings.

On this page