pyssg is pre-1.0 and under active development - APIs, config, and themes may change.
pyssg.cli.commands.deploy

1 min read

pyssg.cli.commands.deploy

pyssg deploy -- push the built site to a hosting provider.

A two-level command: pyssg deploy <target-or-action> where the leaf is either a registered hosting target (github-pages, cloudflare, netlify) or a meta action (list / status).

Built-in targets register themselves lazily: each command calls :func:pyssg.deploy.load_builtin_targets, which imports each target module that has landed (a not-yet-implemented target is simply absent from the registry, and invoking it fails with the pipeline's "unknown deploy target" message). The meta actions work regardless: list shows which targets the site has configured and whether each is implemented, status summarizes the persisted last-deploy record for each.

run_list(site: Path) -> int

Print one line per configured target plus its implementation status.

run_status(site: Path) -> int

Print the persisted last-deploy record for each configured target.

run_target(site: Path, target: str, *, dry_run: bool, force: bool, skip_build: bool, skip_check: bool) -> int

Run the deploy pipeline for target; return a process exit code.

deploy_list(ctx: typer.Context) -> None

List configured deploy targets.

deploy_status(ctx: typer.Context) -> None

Show last-deploy info per configured target.