Publishing
A merge publishes. Nothing else does.
Publishing
Section titled “Publishing”Publishing is a merge to your default branch. There is no publish button that
bypasses it, and there is no push command.
Why it works this way
Section titled “Why it works this way”Your repository is the source of truth. A second way to change the same files is how two writers overwrite each other. So the way a change reaches readers is the way a change reaches your default branch: somebody merges it.
This also means your existing review process still applies. Required reviewers, protected branches and status checks all work, because it is your repository.
What happens on a merge
Section titled “What happens on a merge”-
The checks run
The linter runs over the whole tree. An error refuses the commit before this point, so a merge is checking a tree that already passed.
-
A build is queued
The build needs Node and a git checkout, so it runs on a server rather than at the edge.
-
The output is uploaded
Static files. No deployment, no per-customer worker, no file cap.
-
The edge serves it
Your domain and your Staleless subdomain both serve the new build.
Previews, before you publish
Section titled “Previews, before you publish”A preview is a build of a branch, at a URL with a token in it. Send it to the person who owns the feature.
- It needs no account. The reviewer who matters is often not in your workspace.
- It expires after 14 days by default.
- It can be revoked, because it is a row rather than a signed string.
- It is
noindex, always.
Note
A preview shows the site. The diff shows the change. Reviewers who write use the diff; reviewers who read use the preview.
Rollback
Section titled “Rollback”A rollback creates a new revision that restores the previously published state. History is never erased and nothing is rewritten.
This matters when you roll back twice. The second rollback moves forward again, because every state is a revision rather than a position in a stack.
Publish records
Section titled “Publish records”Every publish records the actor, the timestamp, the affected pages, the revision ids and an optional message. Publish events appear in the audit log and are linked to the exact diff.
Webhooks
Section titled “Webhooks”Two events fire: publish.succeeded and publish.failed. Use them to notify a
channel, invalidate a cache, or trigger a downstream build. See
Webhooks.