Circle Ci with Heroku orb giving "no workflow" error

110 Views Asked by At

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/[email protected]

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

2

There are 2 best solutions below

1
svikramjeet On BEST ANSWER

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/[email protected]

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
0
yaningo On

This means that your filter is not matched.

For your defined workflow to actually run, you'd need to push commits to test-123/test-heroku-orb branch.