Keyboard shortcuts

Press or to navigate between chapters

Press ? to show this help

Press Esc to hide this help

voce deploy

Validate, compile, and prepare a deployment bundle for a target hosting platform. Wraps the full pipeline (validate, compile) and adds platform-specific configuration files.

Usage

voce deploy <FILE> [OPTIONS]

Arguments

ArgumentDescription
<FILE>Path to a .voce.json IR file (required)

Options

FlagDefaultDescription
--adapter <ADAPTER>staticDeployment target: static, vercel, cloudflare, netlify
--dry-runoffShow what would be generated without writing any files

Adapters

Each adapter produces a deployment-ready bundle in dist/:

AdapterOutput
staticCompiled HTML only. Suitable for any static file host (S3, GitHub Pages, rsync).
vercelHTML plus vercel.json with routing and cache headers.
cloudflareHTML plus _headers and _redirects files for Cloudflare Pages.
netlifyHTML plus netlify.toml with headers and redirect rules.

Configuration

The deploy command reads defaults from .voce/config.toml if present:

[deploy]
adapter = "vercel"
output_dir = "dist"

Command-line flags override config file values.

Exit Codes

CodeMeaning
0Deployment bundle created successfully
1Validation failed
2Compilation failed
3Deployment preparation failed (e.g., missing config, I/O error)

Examples

Deploy as static files (default):

voce deploy app.voce.json
# writes dist/app.html

Deploy to Vercel:

voce deploy app.voce.json --adapter vercel
# writes dist/app.html and dist/vercel.json

Preview what a Cloudflare deploy would produce:

voce deploy app.voce.json --adapter cloudflare --dry-run

Deploy with config file defaults:

# With .voce/config.toml setting adapter = "netlify"
voce deploy app.voce.json
# uses netlify adapter from config

Dry Run

The --dry-run flag prints the list of files that would be written and their approximate sizes, without creating or modifying anything on disk. Use this to verify adapter output before committing to a deploy.

$ voce deploy app.voce.json --adapter vercel --dry-run
[dry-run] dist/app.html (12.4 KB)
[dry-run] dist/vercel.json (0.3 KB)

Pipeline

The deploy command runs the full pipeline internally:

  1. voce validate <FILE> – abort on errors
  2. voce compile <FILE> – produce HTML
  3. Generate adapter-specific files
  4. Write all files to the output directory