Publish Retries

A publish has two steps. FOLD first records your request, then moves the site to the release. The key you pass makes it safe to ask again.

Save The Key First

The last argument to publish is a UUID. Generate it and keep it before you run the command.

KEY=$(uuidgen)
pnpm fold publish RELEASE_ID CURRENT_GENERATION "$KEY"

Read The Response

A response with applied: false means the request is recorded and the site hasn't moved yet. Run the same command again, with the same release, generation and key, to read the recorded result. When it returns applied: true, the release is live and the site's generation has advanced.

Do the same if the connection drops or the command times out. The same arguments and key never publish twice.

When You Get A Conflict

HTTP 409 means one of two things.

Run pnpm fold sites to read the current generation and check what is live. If you still want your release live, publish it with the current generation and a new key.

Next: Roll back