Modulify

Check a publish

get_publish_status

Reads the state of a site's most recent publish, plus its public subdomain and custom domains.

running:true means the publish is still going, so poll every few seconds until it is false, then read status. Only ready means the new build is live. failed and cancelled are the other two endings, with the reason in error, and anything else (provisioning, machine-created, machine-started, machine-healthy, deploying or cancelling) is a step still in flight.

The answer also carries the most recent publish's deploymentId and the site's subdomain. A site that has never been published answers with status null and running false.

customDomain is the site's primary domain: the first custom domain, in the order they were added, that is connected, else the first connected www companion. It is null while none is connected or while the custom domains are paused.

domains lists every custom domain with its _id, its www companion, whether each hostname is connected and its DNS records. domainsPaused is true while the domains are paused because the workspace has no paid plan any more, and none of them serves the site until it is on a paid plan again. See Publish a site.

Inputs

Input Type Required Description
projectId string Yes The site id.