Deploying With the Seed CLI
In addition to deploying through Git or your CI, you can trigger a deployment using the Seed CLI.
The Seed CLI allows you to decide when you want a deployment to be triggered in Seed. You could for example:
- Trigger a deployment to your serverless apps after you run your own CI/CD process.
- Or you can programmatically trigger a deployment anywhere in your workflow.
The Seed CLI allows you to better integrate Seed into your organization’s workflow.
Let’s look at how the Seed CLI works.
The Seed CLI is available as an npm package.
You can install it by running:
$ npm install -g @seed-run/cli
You simply need to pass in the:
- Org name
- App name
- Stage name
- Git commit SHA
- Force deploy even if there are no changes
- And a Seed CLI token as an environment variable
For example, to deploy a specific commit to the
dev stage of the
backend-api app in the
$ SEED_TOKEN=$ACME_ORG_TOKEN seed deploy \ --org acme \ --app backend-api \ --stage dev \ --commit 700b9c2
$ACME_ORG_TOKEN is the Seed CLI token for the
Note that the commit doesn’t need to be associated with any specific branch. You can deploy any commit that’s available in Git.
Seed CLI Token
You can generate a token for your org from your org settings.
Make sure to secure access to this token as it allows the Seed CLI to trigger deployments to your organization.
You can also optionally remove the token and generate a new one if necessary.
Note that, you can only create a single token per organization.
Help improve this page. Edit it with GitHub
Was this page helpful? Let us know via Twitter
Do your Serverless deployments take too long? Incremental deploys in Seed can speed it up 100x!Learn More