# This is a sample build configuration for JavaScript.
# Check our guides at https://confluence.atlassian.com/x/14UWN 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: node:18.18.0

clone:
  enabled: true
  depth: full

pipelines:
  custom:
    qa:
      - step:
          caches:
            - node
          script:
            - npm install
            - git push https://heroku:$HEROKU_API_KEY@git.heroku.com/$HEROKU_QA_NAME.git HEAD:master
    prod:
      - step:
          caches:
            - node
          script:
            - npm install
            - git push https://heroku:$HEROKU_API_KEY@git.heroku.com/$HEROKU_PROD_NAME.git HEAD
