CircleCI-Public / heroku-orb

Easily install and use the Heroku CLI with CircleCI to build, test, and deploy your applications to Heroku.
https://circleci.com/orbs/registry/orb/circleci/heroku
MIT License
6 stars 20 forks source link

how to enter a directory to deploy? #22

Closed t-heu closed 3 years ago

t-heu commented 3 years ago

how can i enter the backend directory to commit there on heroku?

version: 2.1
orbs:
  # node: circleci/node@3.0.0
  heroku: circleci/heroku@1.2.3
jobs:
  deploy:
    executor: heroku/default
    steps:
      - checkout
      - heroku/install
      - run:
          command: cd backend
      - heroku/deploy-via-git
workflows:
  heroku_deploy:
    jobs:
      - deploy
dsayling commented 3 years ago

@t-heu , I'm not sure that heroku supports deploying a subdirectory within a repository root. Since, deploy-with-git pushes the full remote git ref to deploy to heroku, https://devcenter.heroku.com/articles/git#deploying-code, the entire repository will need to be pushed to the remote. Changing your directory within the repository/project will have no effect.

kendallroth commented 3 years ago

This is possible manually with git subtree push --prefix [SUBDIR_PATH] [REMOTE_NAME] main; however, this is not supported by the CircleCI orb.