Publish a static output
cmdop publish takes one finished HTML file or one completed static build
directory and puts it on a durable public URL.
cmdop publish ./report.html
cmdop publish ./distCmdop does not upload source code, guess at a project root, or run a framework
build for you. Build locally first, then hand publish only the finished
output.
Publish a directory
cmdop publish ./dist
cmdop publish ./dist --entrypoint app.html
cmdop publish ./dist --spa
cmdop publish ./dist --title "Q3 metrics"| Flag | Purpose |
|---|---|
--entrypoint <file> | The site’s entry file inside the directory. Default index.html. |
--spa | Serve the entrypoint for HTML navigation paths that do not match a file — the setting a client-side router needs. |
--title <text> | Display title for the publication. |
--publication <id> | Update an existing publication instead of creating one, keeping its URL. |
--json | Print the machine-readable result. |
Use --json when a script or an agent needs the resulting URL and version
identifier.
Update an existing publication
cmdop publish ./dist --publication <publication-id>This creates a new version behind the same public URL. The identifier comes
from the output of the original cmdop publish.
Inspect, roll back, and unpublish
cmdop publication manages what is already live.
cmdop publication status <publication-id> <version-id>
cmdop publication status <publication-id> <version-id> --json
cmdop publication rollback <publication-id> <version-id>
cmdop publication unpublish <publication-id>rollback makes an earlier ready version the current one, so a bad deploy is
undone by pointing back at the version that worked rather than rebuilding.
unpublish revokes the public URL immediately. revoke is an alias for it.
Related
- All commands
- cmdop tunnel — expose a running local port instead of a finished build.