Skip to the content
Documentation

exp:expstaticpublish

No ratings yet

Available since Exponential 6.0.15 (in development, not in a release yet).

Summary

Publish a target's static build (static publishing): commit it in the target's git repository, tag it static/<target>/<n> and push it, never forced

Usage

./console exp:expstaticpublish [options]
php bin/php/expstaticpublish.php [options]
./console exp:static:publish [options]

Aliases

exp:static:publish

Help

The output of ./console help exp:expstaticpublish (the script run with --help), without the standard options:

Usage: bin/php/expstaticpublish.php [OPTION]... [TARGET]
Publish a static build to its git remote
Commits the build in the target's folder (var/<site>/static-publish/<target>/, a git repository of
its own: only the files of the build), tags the commit static/<target>/<n> and pushes the branch and
the tag to the target's Remote, signed in with its Credential (a token from Setup > Secrets, a deploy
key, or none). A push is never forced; a push that fails stays local and exp:static:push or the
cronjob part staticpublish tries again. Every publish is a row of exp_static_run.

./console exp:static:publish github-public --build
./console exp:static:publish github-public --nodes=2,57             build these nodes' pages, then publish
./console exp:static:publish github-public --message="New opening hours"
./console exp:static:publish github-public --no-push                commit and tag only


Options:
  --build           Build the target first (as exp:static:build); nothing is committed when the build does not finish
  --nodes=VALUE...  Build only the pages of these nodes (node ids; a comma list or repeated), in each siteaccess of the target; the rest of the last build stays
  --message=VALUE   The commit message (default: what was published, or which publish is restored)
  --no-push         Commit and tag, but do not push (exp:static:push pushes later)
  --format=VALUE    text (default) or json (the machine output exp-static/1)
  --login=VALUE     Run as this user (the administration starts its jobs so); recorded as who ran it
  --run-id=VALUE    The id of the run (date-time-6 hex digits) instead of a new one (the administration passes its job's id)
  --progress=VALUE  Also append the progress, one JSON object per line, to this file (the administration follows it)

Options

Option Value Description
--build - Build the target first (as exp:static:build); nothing is committed when the build does not finish
--nodes required Build only the pages of these nodes (node ids; a comma list or repeated), in each siteaccess of the target; the rest of the last build stays
--message required The commit message (default: what was published, or which publish is restored)
--no-push - Commit and tag, but do not push (exp:static:push pushes later)
--format required text (default) or json (the machine output exp-static/1)
--login required Run as this user (the administration starts its jobs so); recorded as who ran it
--run-id required The id of the run (date-time-6 hex digits) instead of a new one (the administration passes its job's id)
--progress required Also append the progress, one JSON object per line, to this file (the administration follows it)

Arguments

[target]

Standard options

Every script also takes the standard options of the script framework: --help, --quiet, --siteaccess, --debug, --colors, --no-colors, --logfiles, --no-logfiles, --verbose and --allow-root-user.

Source

bin/php/expstaticpublish.php, kernel/private/classes/commands/expstaticpublish.php

See also

Generated example: exp:expstaticpublish

Added to the reference for Exponential 6.0.15.

Contributors

Comments

Add a comment

Comments are read by a moderator before they appear.