K

Deploy through staging

Put new code on a test environment first instead of straight to production. Published apps reach production only through this path.

Staging is a test environment that sits alongside your live service (production).
New code goes here first, you check it, and then it goes to production.

Published apps can't deploy directly. Once an app has passed review and gone public, code can't go straight to production — the only open path is turn staging on, verify, then get approval to promote it.

Turning staging on

Turn it on in the app console → Deploys tab. Doing so seeds staging with the version currently in production, so both environments start from the same place.

From the terminal it looks like this. It changes state, so it previews by default — add --execute to actually turn it on.

axhub deploy staging enable --app demo --execute

After that, the Deploys tab shows production and staging side by side.

Deploying to staging and checking it

Deploying from the Deploys tab now goes to staging. You can push the connected branch's latest commit there without a git push.

Once it's up, open the staging address and check that it behaves.

Some things are separate per environment.

  • Database — production and staging get separate DBs. Test data never touches real data
  • Environment variables — to use a different value in staging only, set one with axhub env set-staging-value (Set environment variables)
  • File storage — this one is shared. Separate files with a prefix like staging/

Promoting to production

When staging checks out, request promotion. An admin approves, and that version moves to production.

If you're widening visibility at the same time, the visibility change also lands when it reaches production, not when it's approved.

Promotion ships exactly what staging already built — nothing is rebuilt, so what you verified in staging is what production gets.

If a promotion fails, run the preflight check to see why and retry.

axhub deploy promote-preflight --app demo          # pre-promotion check
axhub deploy promote retry --request <request-id> --execute

Turning staging off

You can turn it back off in the Deploys tab — from the terminal, axhub deploy staging disable --app demo --execute. Deploys then go straight to production again. Published apps can't turn it off, since direct deploys are blocked for them.

You've succeeded when

The Deploys tab shows production and staging side by side, and a version you put on staging moves across to production after you verify it.

Next, decide who can see the app in Visibility & access.