Filters on branches does not work as expected


I try to launch circleci on all the github branches of my project , except one, without success.

What I expect : don’t run circleci on my “gh-pages” branch. In all others cases, run circleci.
What I tried : filters with “ignore” or “only” value + read all the topics about filters errors and tried every responses.

My conf file is very simple, I really don’t understand why it does not work :

version: 2.1

  version: 2
      - build-and-test:
                - gh-pages

      - image: circleci/node:12.14.0-browsers
      - checkout
      - run: npm ci
      - run: npm test

I have tried many other variants, for example :

      - build-and-test:
              ignore: gh-pages
                - dev
                - /tech-.*/
                - /feature-.*/

But every times I got my circleci running after updating my “gh-pages” branch …

How to make the filters work as expected?

If it can help, here is my project link :

Hi @Anne-Gaelle,

It looks like this error might be caused by not having a config.yml file in your gh-pages branch of your repo. Adding a config.yml file should resolve your issue. Can you give it a try and let me know how it goes.

Hi Henna,

Thank you very much for your answer.
I didn’t think it would be necessary to dupplicate config.yml to my gh-pages.

As the content of my gh-pages is generated automatically, it’s a bit annoying to have to add the config each time. So for now, I will put the tag [skip ci] in my commits for the gh-pages.

Thanks a lot.

You are very welcome. Feel free to follow up here if any additional questions come up.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.