Help centre

Deploy

Deploy from the command line

Deploy, follow logs and roll back from your terminal or CI with the BuildPusher CLI.

  1. 1

    Install it

    Run curl -fsSL https://buildpusher.com/cli/install.sh | sh. It’s one PHP file, so it needs PHP 8.1 or later.

  2. 2

    Log in

    Create an API token with the Deploy scopes under Account → API tokens, then run buildpusher login and paste it. In CI, set BUILDPUSHER_TOKEN instead.

  3. 3

    Deploy

    Run buildpusher deploy <project> [environment] --wait to deploy and follow the log; add --ref=v1.4.0 to deploy a tag, branch or commit. It exits non-zero if the deploy fails, so CI jobs fail with it.

  4. 4

    Follow and undo

    buildpusher status lists recent deploys, buildpusher logs <id> --follow streams one, and buildpusher rollback <id> goes back to the release a deploy shipped.

  5. 5

    Set defaults

    Put {"project": "shop", "environment": "staging"} in .buildpusher.json at the root of your repository to leave them off each command.

  6. 6

    In GitHub Actions or code

    Deploy from a workflow with the BuildPusher GitHub Action, or from your own code with the PHP (buildpusher/sdk) and JavaScript (@buildpusher/sdk) SDKs.

Still stuck? Email us, or send feedback from inside the app.