herokuyamlcirclecicircleci-workflowsheroku-ci

Circle Ci with Heroku orb giving "no workflow" error


I want to use a circle ci yaml pipeline to deploy to a Heroku App.

The yaml file I have right now is:

version: 2.1

orbs:
  heroku: circleci/heroku@0.0.10

jobs:
  heroku_deploy_review_app:
    executor: heroku/default
    steps:
      - checkout
      - heroku/install
      - heroku/deploy-via-git:
          app-name: $HEROKU_APP_NAME

workflows:
  heroku_deploy:
    jobs:
      - heroku_deploy_review_app:
          filters:
            branches:
              only:
                - test-123/test-heroku-orb

There are no issues from syntax side for this YAML. However, when I run this pipeline, I see enter image description here

I am not sure what I am doing wrong because this code looks all fine to me. I also confirmed with doc https://circleci.com/docs/deploy-to-heroku/ and https://circleci.com/developer/orbs/orb/circleci/heroku


Solution

  • First thing first, You can only see this workflow if you are pushing your code to test-123/test-heroku-orb branch, please check if you are mistakenly pushing to the main branch.

    Secondly, you need to make a small adjustment to .circleci/config.yml

    version: 2
    
    orbs:
      heroku: circleci/heroku@0.0.10
    
    jobs:
      heroku_deploy_review_app:
        executor: heroku/default
        steps:
          - checkout
          - heroku/install
          - heroku/deploy-via-git:
              app-name: $HEROKU_APP_NAME
    
    workflows:
      version: 2
      heroku_deploy:
        jobs:
          - heroku_deploy_review_app:
              filters:
                branches:
                  only:
                    - test-123/test-heroku-orb