Deploy
There are two ways to deploy: from your machine to the development stage, and from GitHub to every stage. Both deploy the Foundation first, then the root site and the Slices.
See the plan
pnpm nx run my-workspace:deployment-plan -- --action=deploy --stage=developmentThis prints the ordered set of projects a deployment would run. It changes nothing.
Deploy development from your machine
pnpm nx run my-workspace:deploy-local -- --stage=development --expectedRoleArn=<role-arn> --profile=<profile>Use temporary credentials for your development account. --profile names your AWS profile and --expectedRoleArn is the deployment role you expect to be using; the command checks the two agree before it changes anything. It runs workspace-health first.
Deploy from GitHub
.github/workflows/deploy.yml deploys from your branches. It assumes the stage’s deployment role through GitHub OIDC, so the repository stores no long-lived AWS keys. The main branch deploys production, in the production GitHub environment, so that environment’s protection rules apply. The workspace README.md states which stage the develop branch deploys for your deployment profile.
Operate one Slice
| Target | What it does |
|---|---|
deploy | Verifies the Slice, then deploys it. |
refresh | Refreshes the Slice’s SST state. |
unlock | Releases a stuck SST state lock. |
remove | Removes the Slice’s deployed resources. |
Continue building