Mysterious behaviour (a bug?) of GitHub Pages on a project created from a template

I’ve been experimenting with that for a day, and here is what I’ve discovered.

I’ve created a Template Project (, which contains a GitHub Action. The action generates an HTML website and pushes it to gh-pages branch.

As an experiment, I created a new public project from that template ( The action had been triggered and a new gh-pages branch had been created and pushed. Unfortunately, the GH page has not been generated.

No matter what I do (mostly - retrigger the action by pushing new code to master) - the GH Page doesn’t show up.

The only way to make the page show up is to go to the project’s settings, change GH Pages source branch to master branch, and then change it back to gh-pages branch.

This behavior is looking counterintuitive to me, that’s why I assume it’s a bug. Is it?

1 Like

Hi there! :wave: Welcome to the Community!

You have run into a quirk of using Actions to build Pages that is coming up more and more often.

In order to be built and published for the very first time, a GitHub Pages repository must have a commit pushed to the publishing source branch by a user with admin permissions for the repository, such as the repository owner.

In these cases, the github-actions user pushes, but doesn’t have admin access to the repository.

Once a commit has been pushed to the gh-pages branch by a user with admin permissions, you should find the site live and available shortly thereafter. Subsequent commits pushed by accounts with write access (like github-actions) will then also trigger a build.

This is on our engineers’ radar, so stay tuned for future changes which may fix this quirk.

I hope that helps to explain! Let us know if there’s anything else we can do.

1 Like

Hi, @tmetz! Thank you for your reply. It’s a pity that a site couldn’t be created automatically with github-actions. Guess, I’ll just have to update my documentation to fix the problem for now.