Skip to content

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.

Terminal window
quant deploy [dir] [options]

If dir is omitted, quant deploy uses the directory configured by quant init (default build).

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:

  1. Unpublishes any paths that exist on the CDN but no longer exist locally — unless --skip-unpublish is set.
  2. Purges the cache for affected paths — unless --skip-purge is 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.

Name Description
dir Directory containing static assets. Defaults to the value from quant.json.
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.

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.

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.
Terminal window
quant deploy
Terminal window
quant deploy ./dist
Terminal window
quant deploy --chunk-size 20
Terminal window
quant deploy --skip-unpublish-regex '^/legacy/.*'
Terminal window
quant deploy --force