Technical Reference / speakeasy push
speakeasy push
Deploy staged sources to a project.
The push command deploys the staged sources in a deployment configuration
to the target project.
For more information on staging sources, see the speakeasy stage
reference.
The speakeasy push command requires an API key, an organization slug, and a
project slug. After running speakeasy auth, these values come from the local
profile. For more information on these values, see the global CLI
options.
speakeasy pushAfter the deployment completes, the command prints a link to view the
deployment in the dashboard. If the deployment fails, check its logs with
speakeasy status.
Deployment file
Section titled “Deployment file”The deployment file contains the configuration for all sources that will be pushed. Below is a sample deployment file:
{ "schema_version": "1.0.0", "type": "deployment", "sources": [ { "type": "openapiv3", "location": "/path/to/spec.yaml", "name": "My API", "slug": "my-api" } ]}Note on slugs
Names and slugs must be unique across all sources in the target project.
Options
Section titled “Options”config
Section titled “config”This specifies the path to the deployment file. It defaults to
speakeasy.deploy.json in the current directory, or gram.deploy.json when
only that older file exists.
speakeasy push --config ./path/to/speakeasy.deploy.json [command options]method
Section titled “method”This specifies the deployment method for handling existing artifacts. If not specified, it defaults to merge.
merge: The deployment merges with any existing deployment artifacts in the project.replace: The deployment replaces any existing deployment artifacts in the project.
speakeasy push --method replace [command options]idempotency-key
Section titled “idempotency-key”This adds a unique key to identify the deployment request for idempotency. It ensures the same deployment isn’t applied multiple times if the command is run
again with the same key. It only applies when the method is replace.
speakeasy push --idempotency-key unique-deployment-id [command options]skip-poll
Section titled “skip-poll”Use this option to skip polling for deployment completion and return immediately. By default, this is set to false.
speakeasy push --skip-poll [command options]