Skip to content

Deployment

The Deployment tab is three different things on one page. They do not all ship the build.

GitHub environments

If the repo has GitHub environments, this is a readout of the latest deployment per environment — SHA, ref, state. Open goes to GitHub. Nothing here deploys. Nocturnal also reads these deployments every five minutes so the Changes tab can show what CI put live; they are never written into your repo.

Deploy scripts

Scripts with kind: 'deploy' in .nocturnal/project.json run on this machine, same as any other script. They exit and leave history. Each run is also recorded as a deploy: where it went, what was on disk, whether it worked, and which changes it carried. Release history lists them ("carried 4 changes" opens those changes). Recording never blocks a run.

Each deploy script shows where it goes. When its name does not say (a bare "Deploy" or "Ship"), Nocturnal asks once — Where does this go? Production, Staging, Preview, Test channel, Other, or Not a deploy — and saves the answer as target in project.json. Until then that script's runs are not recorded. If the engine restarted while a deploy ran, the row asks It worked or It failed.

Mark live… records a deploy that happened outside Nocturnal, such as a hosting console or another machine. It does not deploy anything.

Parts

Parts of this project splits a project that ships in pieces — a website and a desktop app, say. Each part lists the folders it is built from and the deploy scripts that ship it. A change is Live only when every part it touched has shipped.

Preview from a chat

Deploy preview in a chat's menu ships the branch your repository is checked out on to a temporary URL, using whatever the project already deploys with — a Firebase Hosting channel, a Vercel preview, a Netlify draft, a Cloudflare Pages branch build. It is detected from the repo (firebase.json, vercel.json, netlify.toml, wrangler.toml), so there is nothing to configure for those.

This never deploys to production. Every command used here is the host's own preview mechanism, and the link appears in the chat that built the work. Firebase channels expire after seven days and the chat marks the link stale when they do.

For any other host, add a script of kind: 'deploy' to .nocturnal/project.json with "preview" in its name — that command wins over detection. {channel} and {branch} are substituted:

{ "id": "preview", "name": "Deploy preview", "kind": "deploy", "command": "npm run deploy -- --alias {channel}" }

Mark deployed

Stamps the current entry in .nocturnal/versions.json and records a deploy of that version's commit. It does not push, tag, or run a host. Use it when that SHA is actually live so the dashboard, the CI card and the Changes tab can show it.

See Changes, Version control and Scripts.