Host

deploy()

host.deploy({ files, code?, server? }) → Promise<Deploy>

Puts files online. A folder path under Node, a list anywhere — and nothing secret ever goes, with what was dropped reported.

POST20 000 files · 25 MB eachsecrets never ship
Using Python?

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

await site.deploy({ files: "./out" });                               // Node: a folder
await site.deploy({ files: [{ path: "index.html", content: html }] }); // anywhere
await app.deploy({ files: "./build", server: "server/index.js" });
await fn.deploy({ code: "export default { async fetch(request) { … } }" });
site.deploy(files="./out")                                        # a folder on this machine
site.deploy(files=[{"path": "index.html", "content": html}])      # files you hold in memory
fn.deploy(code="export default { async fetch(request) { return new Response('ok') } }")   # an edge module
filesstring | array

A folder path (Node), or [{ path, content }]. content takes text or bytes.

serverstring

For an app: the server module inside that folder.

codestring

For a function: the module itself.

Nothing secret ships, and what was dropped is said

DroppedWhy
.env and its variantsCredentials, served publicly.
.git/The whole history, including what was removed from it.
node_modules/Enormous, and not what is served.
Dropping them quietly would be worse than not dropping them

The answer lists what was skipped. Somebody who meant to deploy a file named like one of these learns it did not go, rather than wondering later why the page is missing.

An app's server module is not one of its files

It is pulled out of the assets

An asset is served publicly, so leaving the server module among them would publish the application's source on its own site. It ships as the module instead — and no wrapper is needed, since assets are served first and the module only gets what they do not cover.

The bounds, imposed before anything is sent

ThingBound
Files per deploy20 000
One file25 MB
A function's code10 MB

Checked here rather than discovered at the far end, so a deploy that cannot work fails before the bytes travel.

A deploy replaces the set

It is not additive: a file that was online and is not in this deploy is gone. That is also why a rollback is a complete return rather than a patch.

A path cannot leave the root

Normalised, and refused if it climbs out. A file cannot be served from somewhere other than where it was put.

A site needs an index

A site with no entry page is refused: it would answer nothing at its own address.

Errors

CodeStatusWhen
nothing_to_deploy400No files, no code, or a file with no path.
deploy_too_large413Past one of the bounds. The message names the file.
quota_exceeded403The account's object storage is full.
hosting_kind_unavailable501That kind cannot serve.