deploy Commands
deploy
Description for deploy
This command must be run from within a project.
The command first analyzes your project, your active or logged-into environments, and local defaults to determine what to deploy and where to deploy it. The command then prompts you for information about this particular deployment and provides intelligent choices based on its analysis.
For example, if your local project contains a source directory with metadata files in source format, the command asks if you want to deploy that Salesforce app to an org. The command lists your connected orgs and asks which one you want to deploy to. The list of orgs starts with scratch orgs, ordered by expiration date with the most recently created one first, and then Dev Hub and production orgs ordered by name. If the command finds Apex tests, it asks if you want to run them and at which level.
The command stores your responses in the "deploy-options.json" file in your local project directory and uses them as defaults when you rerun the command. Specify --interactive to force the command to reprompt.
Use this command for quick and simple deploys. For more complicated deployments, use the environment-specific commands, such as "<%= config.bin %> project deploy start", that provide additional flags.
Examples for deploy
Deploy a project and use stored values from a previous command run:
1sf deployReprompt for all deployment inputs:
1sf deploy --interactiveUsage
- sf deploy
- [--json]
- [--interactive]
Flags
- --json
- Optional
-
Format output as json.
- Type: boolean
- --interactive
- Optional
-
Force the CLI to prompt for all deployment inputs.
- Type: boolean
deploy functions
Description for deploy functions
You must run this command from within a git repository. Only committed changes to Functions are deployed. The active branch is deployed unless specified otherwise with `--branch`.
Examples for deploy functions
Deploy a Salesforce Function:
1sf deploy functions --connected-org org-aliasDeploy to 'deploy-branch':
1sf deploy functions --connected-org org-alias --branch deploy-branchOverwrite the remote repository:
1sf deploy functions --connected-org org-alias --forceUsage
- sf deploy functions
- [--json]
- -o CONNECTED-ORG
- [-b BRANCH]
- [--force]
- [-q]
Flags
- --json
- Optional
-
Format output as json.
- Type: boolean
- -o | --connected-org CONNECTED-ORG
- Required
-
Username or alias for the org that the compute environment should be connected to.
- Type: option
- -b | --branch BRANCH
- Optional
-
Deploy the latest commit from a branch different from the currently active branch.
- Type: option
- --force
- Optional
-
Ignore warnings and overwrite remote repository (not allowed in production).
- Type: boolean
- -q | --quiet
- Optional
-
Limit the amount of output displayed from the deploy process.
- Type: boolean