FerryDocs
Getting startedSet up the CLI

Use the CLI in CI

In a CI job, two environment variables give the server and the token to ferry.

Edit on GitHub
New tokenin the dashboardCI secretsCI jobferry deployferryd

In CI, no person is there to approve a login. You create an API token.

1 / 4

Do it

Create an API token

In the dashboard, open Server → Account → API tokens. Click New token. Give a name such as CI, and an expiry.

The dashboard shows the token one time.

Keep the token in your CI secrets

The script gets the token from the secrets. Do not write the token in the script.

Set the two variables in the script

deploy.sh
export FERRY_SERVER=https://ferry.apps.example.com
export FERRY_TOKEN="$FERRY_API_TOKEN"   # from your CI secrets

ferry deploy api --follow   # exits with 1 if the deploy fails

The two variables win over the config file.

The token has full access

The token can do all that the does. You can revoke it at each time under Server → Account.

On this page