Gh-pages not being ignored

I keep getting an annoying “build failed” email seemingly because the git push in my deploy step is triggering a build on the gh-pages branch which I want to be ignored by circle-ci. As you can see in my config, I’ve specified to only build the master branch. Seems like a bug?

Here is my (condensed) config.yml

version: 2
                - master
            - image: circleci/node:10-stretch
            - checkout
            - deploy:
                name: Deploy
                command: |
                    cd docs/.vuepress/dist
                    echo '' > CNAME
                    git config --global ""
                    git config --global "Circle CI"
                    git init
                    git add -A
                    git commit -m 'deploy'
                    git push -f master:gh-pages

The commit to the GH-pages branch will have no config.yml present, so the branch filter isn’t present when we receive notification of the push.

The thing to do is to add [ci skip] to your commit message on the GH-pages branch. This will cause the build to be skilled.

1 Like

Cool! That worked like a charm!

Shouldn’t there be a way to set up the config file in the gh-pages branch so that Circleci understands there is nothing to be done here? It just feels strange to have to copy the jobs from the master branch to gh-pages and then setup a filter to ignore the job. So what I am asking for is a simple noop config. I tried:

version: 2

but that still gives:

#!/bin/sh -eo pipefail
# [#] required key [jobs] not found
# -------
# Warning: This configuration was auto-generated to show you the message above.  
# Don't rerun this job. Rerunning will have no effect.

I’m still seeing a failure, even when using [skip ci] for commits to the gh-pages branch :disappointed:

(this is from a tool that will wipe a config, so I can’t just push a Circle config, even a dummy one, to that branch).