forge app deploy
Deploy an app via git SHA or artifact upload.
Command
forge app deploy <app-id> [--sha <git-sha>] [--file <path>] [--env <name=value>]
Arguments
| Name | Type | Required | Notes |
|---|---|---|---|
| string | yes | App ID () |
Flags
| Flag | Type | Default | Notes |
|---|---|---|---|
| string | — | Git SHA for git-triggered deploy |
| path | — | Path to artifact tarball for upload deploy |
| string[] | — | Environment variables (repeatable: ) |
Either
or--shamust be provided, but not both.--file
Examples
Git-triggered deploy:
forge app deploy app_xxxxx --sha a1b2c3d
Artifact upload:
forge app deploy app_xxxxx --file ./dist/app.tar.gz --env NODE_ENV=production
Errors
| Exit code | Meaning |
|---|---|
| 0 | Deploy triggered successfully |
| 1 | Invalid input or missing --sha/--file |
| 2 | Auth failure |
| 3 | App not found |
| 4 | Build failed |
Pitfalls
- Either --sha or --file — you must provide one. Providing both or neither is an error.
- Async build — the command returns as soon as the build is queued. Use
to track progress.forge app deploy-status <id> - Large artifacts — file uploads over 100 MB may timeout. Use git-triggered deploys for large apps.
See also
{auto-injected}
Tested against
{auto-injected}