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 to | Result |
|---|---|
main | Production deployment on your storefront URL |
| any other branch | Preview 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_:
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:
--tokenflagCLOUDCART_NOVA_TOKENin your environment or.envfile- 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_TOKENCI 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_TOKENEnvironment 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 environmentsenv 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.
Storefront MCP Server
@cloudcart/storefront-mcp: an MCP server with the CloudCart Storefront GraphQL schema, so AI agents build Nitrogen storefronts with validated queries. Runs locally, no token, no store access.
CLI Reference
Every cloudcart nitrogen command — init, dev, build, preview, link, env, generate, deploy.