# hosting.deploy

Canonical URL: https://developers.iagenify.com/sdk/workflows/steps/hosting-deploy/
Language: en

`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.

Status: needs approval upstream · host required · storage or code

> **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.

| Name | Type | Requirement | Description |
| --- | --- | --- | --- |
| `host` | string | required | Which host. |
| `storage` | string |  | An object storage holding the files. |
| `prefix` | string |  | Which folder of it. |
| `code` | string |  | A function module, instead of a storage. |

One of `storage` and `code` is required.

## A run cannot read a computer {#no-machine}

> **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.

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

## Output {#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 {#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 {#retry}

A [retry](/sdk/ref/workflow-run/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.

- [human](/sdk/workflows/steps/human): The approval these three require.
- [hosting.create](/sdk/workflows/steps/hosting-create): The host.
- [Workflow steps](/sdk/workflows/steps): The 23 types.

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