quant deploy
Deploy the contents of a build directory to QuantCDN. Pushes new and changed files, optionally unpublishes files removed locally, and purges cache for affected paths.
Synopsis
Section titled “Synopsis”quant deploy [dir] [options]If dir is omitted, quant deploy uses the directory configured by quant init (default build).
Description
Section titled “Description”deploy walks the build directory, compares each file’s MD5 against what’s already on the CDN, and uploads anything new or changed. After the upload completes it:
- Unpublishes any paths that exist on the CDN but no longer exist locally — unless
--skip-unpublishis set. - Purges the cache for affected paths — unless
--skip-purgeis set.
The unpublish step compares the whole project, not only paths earlier deploys created. Pages made in the dashboard editor, by a CMS integration, with quant page or in Studio are unpublished if they are not in the build directory. Redirects and edge functions are never unpublished. Unpublished content is not deleted: its revisions remain and quant publish restores it. To keep paths published, use --skip-unpublish or --skip-unpublish-regex, or put the content in the build. Run quant scan --diff-only first to preview the changes.
This makes quant deploy the standard command at the end of a CI build. For partial deployments of a single file, use quant file or quant page instead.
Arguments
Section titled “Arguments”| Name | Description |
|---|---|
dir |
Directory containing static assets. Defaults to the value from quant.json. |
Options
Section titled “Options”| Flag | Description | Default |
|---|---|---|
--skip-unpublish |
Don’t unpublish content removed locally. | false |
--skip-unpublish-regex |
Regex of paths to keep published even if removed locally. | — |
--skip-purge |
Don’t purge cache after deployment. | false |
--enable-index-html |
Keep index.html in URLs instead of normalising to /. |
false |
--chunk-size |
Number of files uploaded concurrently. | 10 |
--force |
Re-upload all files even if their hashes haven’t changed. | false |
--skip-unpublish-regex is tested against the stored URL, which has a leading slash and is lowercase. Choose --enable-index-html once per project. With it, about/index.html is published at /about/index.html instead of /about. The first deploy saves the choice in quant.json and the CLI refuses the opposite value afterwards. In CI there is usually no quant.json, so keep the setting the same in every run or the same page is published at two URLs.
Failed uploads and the revision log
Section titled “Failed uploads and the revision log”A file that fails to upload prints Warning: Failed to deploy <file>. The command still finishes, and it still runs the unpublish step, so search the log for that text. When a revision log is in use, a file whose path and MD5 are in the log is skipped without contacting Quant, and entries are never removed. If content was changed or unpublished outside the deploy and the local file is unchanged, the deploy skips it; run quant deploy --force or delete the log to re-send everything. Without --revision-log the CLI writes quant-revision-log_<project> in the working directory.
Advanced options
Section titled “Advanced options”These flags exist for specific workflows and are hidden from --help:
| Flag | Description |
|---|---|
--revision-log <path> |
Track per-file MD5 hashes in a local log for faster incremental deploys without round-tripping to the API. |
--attachments |
Process attachments alongside the deploy. |
Examples
Section titled “Examples”Deploy the configured directory
Section titled “Deploy the configured directory”quant deployDeploy a specific directory
Section titled “Deploy a specific directory”quant deploy ./distFaster CI deploys with concurrency
Section titled “Faster CI deploys with concurrency”quant deploy --chunk-size 20Preserve manually managed paths
Section titled “Preserve manually managed paths”quant deploy --skip-unpublish-regex '^/legacy/.*'Force a full re-upload
Section titled “Force a full re-upload”quant deploy --forceSee also
Section titled “See also”quant scan— preview what would change without uploading.quant purge— manually purge cache.- CI/CD pipelines — full GitHub Actions example.
