Skip to content

helaili/deploy

Repository files navigation

deploy Build Status

A Probot app triggering deployment events on GitHub based on pull request labels.

probt-deploy-640

⚠️ This app doesn't deploy anything. ⚠️ It just triggers a deployment request which will be forwarded to any webhook listening to the deploy event on your repo or on your organization. Check GitHub's deployment API for more information.

Setup

  • Install the app from its public page

  • Commit a .github/deploy.yml file in your repository with the description of your environments. Spaces must be escaped. You can use whichever environment parameter used by GitHub's deployment API

labels:
  Deploy%20to%20Staging:
    environment: staging
  deploy-to-test:
    environment: test
    description: A test environment based on Docker
    transient_environment: true
    auto_merge: false
    required_contexts:
      - continuous-integration/travis-ci/push
    payload:
      port: 8080
      https: true
  • Create matching labels in your repository

image

  • Now just add one of these labels to your PR. The label will automatically be removed once the deployment has been requested.

image

FAQ

In case you haven't waited for your Continuous Integration or other integrations to complete, or if one of them has failed and should be considered optional, you will get the comment below. You then have to modify your label description and include a required_contexts section which will list those contexts which are required. All others will be optional.

image

If your branch is conflicting with master, your deployment will fail (see below). If you do want to deploy a conflicting branch, then set auto_merge to false in your label configuration.

image

This app works for both github.com and GitHub Enterprise. In the later case, you will need to run your own instance of this app as described in the Pobot documentation. Do not forgot to set the GHE_HOST environment variable as described here.

Contributing

If you have suggestions for how deploy could be improved, or want to report a bug, open an issue! We'd love all and any contributions.

For more, check out the Contributing Guide.

License

ISC © 2020 Alain Hélaïli helaili@github.com (https://github.com/helaili/deploy)

About

A Probot app to trigger deployments on GitHub

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published