Publishing
Until a site publishes, its visitors see the working branch: every saved edit is live at once, which is right for a site being built. Publishing separates the two: authors keep working on main, and the site reads publish, where only what was explicitly published exists.
What Publish does
Pressing Publish on a page copies that node, its translations and — with Publish with children — its subtree from the working branch to the publish branch, and records who published what. The page’s status shows published, modified since publish or unpublished; Unpublish removes it from the publish branch without touching the working copy. A publish can be scheduled for a time, and a scheduled publish can be cancelled. Publishing runs through the same automation engine as everything else, so a four-eyes approval before anything goes live is a human-in-the-loop task on the publish flow, not a feature to build.
Everything a page references must be published too: its images (the assets workspace), its brand, the pages its links point at. Publishing a page offers to include its references; the header, footer and brand are published once and rarely again.
What the site does
One environment variable:
RAISIN_LIVE_BRANCH=publish
The middleware reads it for every request without a preview session. The editor’s preview keeps reading main. Because a branch is repository-wide, a site reading publish sees an unpublished story as no story — so the first publish is the whole story with children, the brand and the assets, and only then the switch.
Writes never depend on the read branch: a form submission is created on the working branch, where the automations that handle it run.
Caching and the live branch
A published branch changes only when someone publishes, which makes it safe to cache aggressively: the Astro example caches the chrome for a minute, and a CDN in front of the site can cache pages by URL. Studio purges that cache when a publish completes, so visitors see the change at once; Caching and purge covers the setup. A page with time-based variant rules is the exception and says so (hasTimeRules). The working branch, in contrast, changes on every keystroke, and the editor’s preview must never be cached.
Pilot documentation. Studio is in a partner pilot. Screens and YAML shown here are current as of the version noted on each page; tell your Maravilla contact when something does not match what you see.