# This is a sample build configuration for PHP.
# Check our guides at https://confluence.atlassian.com/x/e8YWN for more examples.
# Only use spaces to indent your .yml configuration.
# -----
# You can specify a custom docker image from Docker Hub as your build environment.
image: php:7.1.29

pipelines:
  branches:
    dev:
      - step:
          name: Deploy to Dev
          deployment: test
          script:
            - apt-get update && apt-get install -y unzip git
            - git push https://heroku:$HEROKU_API_KEY@git.heroku.com/$HEROKU_APP_NAME.git HEAD:master

    master:
      - step:
          name: Deploy to production
          deployment: production
          script:
            - apt-get update && apt-get install -y unzip git
            - git push https://heroku:$HEROKU_API_KEY@git.heroku.com/$HEROKU_APP_NAME.git HEAD

