Workflow steps

hosting.deploy

type: "hosting.deploy"

Puts files online. It requires a human step upstream, and the files come from a storage or from code — never from a machine.

needs approval upstreamhost requiredstorage or code
Using Python?

Switch any code block to Python: the choice applies to every page. Python SDK guide and resource reference.

A human step is required upstream

This acts outside the account, and a run has nobody to ask. The definition is refused when you save it unless a human step sits on the path that reaches this one.

hoststringrequired

Which host.

storagestring

An object storage holding the files.

prefixstring

Which folder of it.

codestring

A function module, instead of a storage.

One of storage and code is required.

A run cannot read a computer

That is why the source is a storage

A workspace folder exists for a local agent, on a machine. A workflow runs on the platform and reaches no machine — so the files must already be somewhere it can read. The refusal says so rather than failing later.

{ id: "publish", type: "hosting.deploy", config: {
    host: "{{steps.host.output.host}}", storage: "…", prefix: "build/" } }
{"id": "publish", "type": "hosting.deploy", "config": {
    "host": "{{steps.host.output.host}}", "storage": "…", "prefix": "build/"}}

Output

The deploy's identifier and the host's address — enough to roll back, or to tell someone where it is.

Some things are never published

Environment files, version-control folders and dependency folders are dropped, and what was dropped is reported. An app's server module is pulled out of the assets so its source is not served.

Retrying republishes

A retry from this step deploys again. That is usually what you want — and it is still a publication, so the approval it required has already been given once.