ReferenceCLI
concrete publish
The `concrete publish` command — its flags, exit codes and constraints.
Publish the template to HomePages.
Synopsis
concrete publish [--dry-run] [--json] [--env-file <path>] [--no-auto-update]Flags
| Flag | Type | Default | What it does |
|---|---|---|---|
--dry-run | boolean | false | Upload and verify the artifact, report what publishing would change, and write nothing |
--json | boolean | false | Print the settled publication record on stdout instead of the summary |
--env-file <path> | string | — | Read CONCRETE_TOKEN and CONCRETE_API_URL from this dotenv file instead of the workspace's .env |
--no-auto-update | boolean | false | Skip the package refresh this command runs first when the workspace is behind the published release |
Exit codes
| Code | When |
|---|---|
0 | the template was published, the environment already held it as current, or a dry run passed verification |
1 | check is not green, a capture failed, or the platform refuses the publication, fails its verification or cannot finish it |
2 | no publisher key is set, the key is malformed or not accepted, the endpoint cannot be reached, or it runs outside a workspace |
Constraints
- The key is the environment:
CONCRETE_TOKENnames production, staging or dev in its prefix (cpt_prod_…), and publish goes where it points. There is no environment flag. - Reads
CONCRETE_TOKENfrom the environment, then from the workspace's.env.CONCRETE_API_URLreplaces the endpoint the key's prefix names. --env-file <path>names the key file instead, relative to the current directory: its values win over the environment and the workspace's.envis not read. It is how a library holding one key file per environment picks one, in any shell.- Builds and checks on every run, then assembles the artifact — the built files, the authored fixtures, the playground and, for an image or document template, the captures — and uploads it. An artifact is never reused.
- An image or document template's captures are every authored fixture at every declared format, taken exactly as
dev's Download takes it — the enabled pages and their zip, or the PDF. They sit outside the artifact hash, and are taken with the Chromium build the platform renders with: on a machine without it, publish refuses with the one command that installs it. - Prints one line per stage on stderr as it settles: target, build, upload, verify, write, adopt.
- Publishing a tree the environment already holds as current changes nothing, says so, and exits 0. Rolling back is publishing the older tree.
- Under
--jsonthe publication record is the only thing written to stdout; every stage line goes to stderr. - Never prompts, in any environment.
Before it runs
This command first checks that the workspace is on the published release of
@homepages/concrete and refreshes it when it is behind inside the same major —
Staying current has the rules. --no-auto-update skips that for one run.
See also
- Every command — the rest of the command's surface.
