When deploying to GH pages, how to prevent CI from being triggered?

Im trying to deploy to gh-pages and have CI “build” job with cirecleci2.

My problem is - when deploying with “ngh” command, it automatically generates the new commit at “gh-pages” branch
(and thus starts the CI again)

I tried to prevent it by filtering “gh-pages” with “ignore”:

 version: 2
  jobs:
     build:
        branches:
         ignore: gh-pages 

but im still getting ci error “No tests” (which means that CI default process triggered)

Please help

Your branches key looks like it is excessively indented, by one space. Could that be it?

If not, can you give some information about the ngh command? I wonder if you need to explain your workflow, too - I use GH Pages, and I do all the committing manually, and I can’t think of why my CI would modify the repo. I don’t use that binary though.

ngh command is - this node package ngh - npm

can you please post here the “deploy” part of how you doing deployment to gh-pages
Thanks

Did you repair the branches key, as I suggested? Take this:

 version: 2
  jobs:
     build:
        branches:
         ignore: gh-pages

and try changing it to this (minus the comment, obviously):

 version: 2
  jobs:
     build:
       # Correct indentation
       branches:
         ignore: gh-pages

Update

Ignore this - the whole indentation is wrong. See my latest post.

Actually i posted the indentations incorrectly, here is how it really:

version: 2
    jobs:
      build:
        branches:
          ignore: gh-pages

So, i guess the indentation is not the problem…

I just checked the config reference, and the jobs key needs to have zero indentation. Then, each of your build, branches, ignore should have exactly two indentation spaces more than the last one.

That’s not what you have now.

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