Deploying & Environments

Publishing & Deployment

Deploy your app to production or share a preview build, from your coding agent, your terminal or the dashboard

Publishing puts your app's code live at its URL. You can deploy from your coding agent, from your terminal with the Stardeck CLI, or with the buttons in the dashboard. All three run the same deploy.

Production publishing runs from the app's default branch (main) only. Feature branches can create shareable preview deployments for review, but you must merge them into main before publishing to production. See Feature Branches.

Default URL

A published app is served over HTTPS at:

https://app-slug.stardeck.site

app-slug is the slug you set when you created the app. To use your own domain, see Custom Domains.

What a deploy does

  • It ships the branch head on GitHub, not your local checkout. Push first.
  • It applies pending data-store schema changes for that environment, unless you choose to deploy without them. You see them before you confirm, and production asks you to confirm destructive ones. See Data Stores.
  • It ships the app and every ready Surface in one go. See Surfaces.
  • Workflow tests don't run and don't block it. A commit whose full suite passed shows a Verified badge; unverified commits still deploy. See Testing.
  • To try a change on real data first, create a staging: a 24-hour copy on a fresh copy of production's data.

Deploy with your coding agent

Working alongside the Stardeck agent

Stardeck's agents commit to the branch they work on, main or a feature branch. Your own changes reach main through a pull request: GitHub refuses a direct push to main, from your agent's token and from your own GitHub account (GitHub Access).

  • Pull main before you start. Others push to it while you work.
  • Work on a branch. Your agent's token can push only branches named agent/... or starcat/...; your own GitHub account can push any name.
  • Push the branch, open a pull request into main, and merge it when it's ready. To try it first, deploy the branch as a preview.
  • Pushing doesn't update the cloud sandbox. Open Git History on the app's branch page and click Load into Sandbox on the commit you want there.
git switch main && git pull            # start from others' latest work
git switch -c agent/my-change          # work on a branch
git push -u origin agent/my-change     # then open a pull request into main

Ask your agent to deploy

With the Stardeck MCP server connected, ask your agent to deploy, for example "deploy my branch as a preview" or "deploy main to production". It uses the deploy_app tool.

  • Preview and staging deploys run straight away.
  • Production answers first with what it will ship: the exact commit and the pending schema changes, destructive ones included. Your agent shows you that and deploys only after you confirm.

A good routine: preview the branch, check it, merge the pull request, then deploy production. See Tools & Permissions.

Deploy from your terminal

Run it inside your app's clone:

npx @stardeckai/cli@latest deploy

It asks where to deploy. Production is the default.

  • Production ships main to the live app.
  • Preview ships one branch at its own URL. See Branching.
  • Staging runs a branch for 24 hours on a copy of production's data. See Staging.

For a preview or a staging, it asks which branch, starting from the one you have checked out.

Before anything ships, it shows you what will go out: the commit and any destructive data-store schema changes. It warns you if your local branch has commits you haven't pushed. Once you confirm, it waits until the deploy is live or has failed. If the deploy fails, the build and deploy logs are on the app's Deployments page.

Stardeck refuses the deploy, and nothing ships, if either of these changes after you confirm:

  • someone pushes a newer commit;
  • a new destructive schema change appears.

Run it again to see the new plan.

OptionWhat it does
--env <env>production (or prod), preview or staging. Prompts if omitted.
--branch <name>Branch for a preview or staging. Production always deploys main.
--project <id>App to deploy. Defaults to the clone's stardeck.project.json.
--yesSkip the confirmation. Required without a terminal.
--no-waitStart the deploy and exit.
npx @stardeckai/cli deploy --env preview --branch promptpay
npx @stardeckai/cli deploy --env staging --branch promptpay --yes --no-wait

Who can deploy

You need agent:deployments:write in the app's organization and edit access to the app itself (Edit Apps, or a grant on that app).

Branches Stardeck doesn't track yet

If you preview a branch you've pushed but Stardeck doesn't track yet, deploy starts tracking it first. This needs Branching to be on for your organization. Its schema changes go to the preview's own data branch when it has one, and never to production.

Deploy from the dashboard

Deploy to production

  1. Open your app and go to the Settings tab.
  2. Under Deployments, open Production.
  3. Click Review & Deploy. If the app is already live, the button reads Review & Redeploy.
  4. Review the dialog and click Deploy.

If the app has pending data-store schema changes, the review dialog lists them. Check Apply data-store schema changes to apply them with this deploy, or deploy without them.

  • Never deployed: the App tab shows Deploy to production, which opens the same dialog.
  • Make it live right away: ticked by default when you create an app, so the app is published right after creation. If you untick it, deploy from Settings → Deployments → Production.

Preview deployments

To share a build before it goes live, deploy a preview from a feature branch: Settings → Deployments → Preview on that branch. Each branch preview has its own URL. See Feature Branches for the URL format and the limit on active previews.

Deployment details

Each deployment in the history has a details dialog with the deployment logs and the Workflow Tests results for that revision.

If a deploy fails

A failed deploy doesn't take the app down. See Troubleshooting.

Next steps