const [, previous] = await host.deploys(); // the one before the current
await host.rollback(previous.id);previous = host.deploys()[1] # the one before the current
host.rollback(previous["id"])It is a complete return
Because a deploy replaces the whole asset set, going back to one restores exactly what it held — files that appeared since are gone, files that were removed come back. There is no partial state.
Nothing is rebuilt
Which is why it is instant, and why it works even when the code that produced those bytes is long gone. A rollback is the fastest fix there is for a bad deploy.
current follows
host.current becomes the deploy you rolled back to, and the one you rolled back from stays in the history — rolling forward again is the same call.
Domains and the certificate are untouched
The address, the attached domains and the certificate belong to the host, not to a deploy. A rollback changes what is served and nothing else.
In a workflow it is still a publication
It changes what the public internet sees, so the agent's and the workflow's approval rules apply to it as they do to a deploy.