Jekyll 4.0, GitHub Pages and Actions

I setup GitHub Actions, but have had no luck getting the menus to populate. Would you have a working example with gh-pages branch for Jekyll website and this plug-in?

I tested 9 different configuration setups and searched through the docs, plus if anyone else had any issues like this with Jekyll 4.0. I found this: and is closest issue I have had similar to mine.

I was unable to successfully build with Jekyll GitHub Actions 2.0.3 or 2.0.2; 2.0.1 enabled me to compile successfully, but even after success, it didn’t merge repo into the gh-pages branch as the documentation states; plus the Jekyll site with this plugin didn’t populate the menu.

When I push changes, I push them to master repository, then GH actions checks, then is suppose to push to gh-pages to allow more possibility with Jekyll plugins and other features.

Below, I have added some code and also a link to my repository.
Repository: (the GH-Pages setting is set to master @ /root) Also, the repository is an organization and is public.


name: Testing the GitHub Pages publication


    runs-on: ubuntu-16.04
    - uses: actions/checkout@v2

    # Use GitHub Actions' cache to shorten build times and decrease load on servers
    - uses: actions/cache@v1
        path: vendor/bundle
        key: ${{ runner.os }}-gems-${{ hashFiles('**/Gemfile.lock') }}
        restore-keys: |
          ${{ runner.os }}-gems-

    # Standard usage
    - uses:  helaili/jekyll-action@2.0.1
        JEKYLL_PAT: ${{ secrets.JEKYLL_PAT }}

    # Specify the target branch (optional)
    - uses: helaili/jekyll-action@2.0.1
        JEKYLL_PAT: ${{ secrets.JEKYLL_PAT }}
        jekyll_src: 'gh-pages'


       Jekyll Feed: Generating feed for posts
DEPRECATION WARNING on line 7 of /github/workspace/_scss/libs/_breakpoints.scss:
!global assignments won't be able to declare new variables in future versions.
Consider adding `$breakpoints: null` at the top level.

                    done in 0.92 seconds.
 Auto-regeneration: disabled. Use --watch to enable.
Jekyll build done
Cannot publish on branch master

When using this code: (Only thing changed was the version numbers to 2.0.1 and v1 for cache.

name: Build and deploy Jekyll site to GitHub Pages

      - master

    runs-on: ubuntu-16.04
      - uses: actions/checkout@v1
      - uses: helaili/jekyll-action@2.0.1
          JEKYLL_PAT: ${{ secrets.JEKYLL_PAT }}

the build is successful, but does not push or create to gh-pages and populates this error:

error: src refspec *** does not match any

error: failed to push some refs to 'https://'

Hi @csharpee,

Glad to see you in Github Community Forum!

I forked your repository, and tried with version 2.0.1, it’s successful to create gh-pages branch and force push to it.

My workflow:

My GH page setting:

Could you please check again?


Hi @weide-zhou, thank you for testing this.

I created a commit on GitHub to test again, but no success on a new GH-Pages branch.
error: src refspec *** does not match any

My organizational settings are the same as yours.

I don’t know how it works for you, but not me; maybe its a permission thing? I setup my JEKYLL_PAT via with permission of public_repo as the documentation states.

Then, went to organizational account > settings > secrets and copied key from above to JEKYLL_PAT.

Now, going through the steps again; I didn’t use an “organization secret”, but a “repository secret”.
After testing this, it didn’t work either and produced same error shared above.

Furthermore, I forked this repository on another organizational account and only added the token and updated the settings to enable GH-Pages on master.

After this, the repository workflow created the gh-pages branch on the new organizational account. Maybe the dash - between Galactic-Society caused an issue? This is a very weird bug.

Proof the setup works; only thing different is org account name.

For others who may have difficulties with this, I will share a successful result here.