GitHub Pages triggering builds incorrectly

I have a repository with GitHub Pages enabled on the docs folder of the master branch. Every time I push a commit, a build like “github-pages[bot] promoted github-pages to 53d8a712” is created, which always fails due to the tag 53d8a712 not existing (it’s a commit). I don’t think this build should even exist in the first place.

When this occurs, the commit status is correct, but the deployments section on GitHub shows a failed deployment. The GitHub Pages commit status and the site itself is still correctly updated though.


If you do not want Drone to execute for promote / deploy events you should exclude in your yaml using the following syntax:

    exclude: [ promote ]

The event coming from GitHub is a deployment event which triggers a promote pipeline (deploy hooks from GitHub map to promote events in Drone). At first glance this seems to be expected, although I admit I don’t have much time to dig any deeper. I would of course accept patches if there is room for improvement.

I’m considering this a bug, as it didn’t happen before AFAIK, it fails with an incorrect tag, and I don’t really see the point of having Drone trigger during a GitHub Pages build (I’d love to be proven wrong, though).

I’ll include your config tweaks as a workaround for now. Thanks!

Regarding a patch, I’d have to look into that later, as I don’t currently have time to figure out the details of this.

Edit: One thing I just noticed was that it only seems to happen after pushing a tag. I’m not 100% certain about this, though.