Deploy Your Site

Deploy static files to Rollout. This is the main command for getting your site online.

Command

rollout deploy [folder]

Basic Usage

Deploy Current Directory (Default)

rollout
# or explicitly:
rollout deploy

This deploys all files in your current directory.

Deploy Specific Folder

rollout deploy ./dist
rollout deploy ./build
rollout deploy ./public

Options

  • -p, --project <name> - Project name (auto-generated if not provided)

Example with Project Name

rollout deploy --project my-awesome-site

How It Works

  1. File Collection: Scans your directory for files to deploy
  2. Project Detection: Checks for existing .rollout/config.json file
  3. Project Creation: Creates new project if none exists
  4. File Upload: Uploads files to Cloudflare R2 storage
  5. Deployment: Makes your site live at https://your-project.rollout.run

Project Management

Automatic Project Creation

If no project exists, Rollout will:

  • Generate a Heroku-style name (e.g., “ancient-bee-1234”)
  • Create a unique slug for your project
  • Set up automatic subdomain

Project Tracking

After deployment, Rollout creates a .rollout/config.json file:

{
  "projectId": "123",
  "projectSlug": "ancient-bee-1234",
  "name": "ancient-bee-1234",
  "lastDeployment": "2024-01-15T10:30:00.000Z"
}

File Handling

Included Files

  • All files in the specified directory
  • Subdirectories (recursively)
  • Static assets (CSS, JS, images, etc.)

Excluded Files

  • Hidden files (starting with .)
  • node_modules directories
  • Common build artifacts (.log, .tmp, .cache)
  • System files (Thumbs.db, DS_Store)

Example Output

$ rollout deploy ./dist
Deploying /path/to/dist to ancient-bee-1234...
 
Collecting files...
 Found 12 files
 
Deploying files...
 Deployment successful!
 
 Deployment completed successfully!
Project URL: https://ancient-bee-1234.rollout.run
Deployment URL: https://ancient-bee-1234.rollout.run

Troubleshooting

Not Logged In

If you’re not authenticated:

✗ Please login first: rollout login

Empty Directory

If the directory is empty:

✗ Folder is empty

Invalid Project Name

If the project name contains invalid characters:

✗ Project name can only contain lowercase letters, numbers, and hyphens

Deployment Failed

If the deployment fails:

✗ Deployment failed: [error message]