Skip to main content

Overview

The sunpeak deploy command is a convenience wrapper around sunpeak push that automatically applies the prod tag to your resources. This is the recommended way to deploy to production.
sunpeak deploy [file] [options]
sunpeak deploy is equivalent to sunpeak push --tag prod
You must be logged in to use this command. Run sunpeak login first.

Prerequisites

Before deploying:
  1. Login - Run sunpeak login to authenticate
  2. Build - Run sunpeak build to create production bundles

How It Works

The deploy command:
  1. Finds all built resources in dist/
  2. Uploads each resource to the Sunpeak repository
  3. Assigns the prod tag (or a custom tag if specified)
$ sunpeak deploy
Deploying to production...

Pushing 2 resource(s) to repository "myorg/my-app"...
Tag: prod

 Pushed search (id: abc123)
  Tags: prod
 Pushed dashboard (id: def456)
  Tags: prod

 Successfully pushed 2 resource(s).

Arguments

ArgumentDescription
fileOptional JS file to deploy (e.g., dist/carousel.js). If not provided, deploys all resources from dist/

Options

OptionShortDescription
--repository <owner/repo>-rRepository name (defaults to git remote origin)
--tag <name>-tOverride the tag (defaults to prod)
--help-hShow help message

Usage Examples

Deploy All Resources

sunpeak deploy

Deploy a Single Resource

sunpeak deploy dist/carousel.js

Deploy with Custom Tag

If you need a different production tag:
sunpeak deploy --tag production

Deploy to Specific Repository

sunpeak deploy --repository myorg/my-app

Typical Workflow

A standard deployment workflow:
# 1. Build production bundles
sunpeak build

# 2. Deploy to production
sunpeak deploy
Or as a single command:
sunpeak build && sunpeak deploy
Add this to your package.json scripts for convenience:
{
  "scripts": {
    "release": "sunpeak build && sunpeak deploy"
  }
}

Deploy vs Push

CommandDefault TagUse Case
sunpeak deployprodProduction deployments
sunpeak pushNoneStaging, versioning, or custom workflows
Use sunpeak deploy when you want to deploy to production with a simple command. Use sunpeak push when you need more control over tagging or want to push to non-production environments.