Paginate-v2 with github pages confusion

Also the reason I chose that ruby version is it matches my local ruby environment which is set at:
ruby 2.6.1p33 (2019-01-30 revision 66950) [x86_64-darwin20]

@MichaelCurrin Nevermind, I got the build to work. Ran bundle lock --add-platform x86_64-linux and it fixed the issue that my lockfile was built on Mac but the deploy script is intended for linux.

I did have one other question about your build script, why have this part
if: ${{ github.event_name != 'pull_request' }}
in the last section? Doesn’t this if statement stop it from building on pull requests? Wouldn’t you want to test the build on a new feature’s pull request like I did? (that was how i caught my error). Just curious,

1 Like

Oh glad you figured that out. I haven’t had to edit the build system line.

The way I set up my workflow is that indeed on a pull request it will install Ruby and gems and build withbJekyll. That is the quality control or CI part.

But the last step to actually deploy or publish the code only runs not on a PR, meaning only on the main branch. So that is the CD part, in CI/CD.

This check means you don’t have in progress work accidentally overwriting your public live site.

@MichaelCurrin thanks for that info. I just tried to deploy my new feature to production by merging the new feature branch to master but looks like it didn’t work and I don’t know why. Nothing failed form my perspective in the GitHub actions but i don’t see any new deployments in the deployments section. Furthermore i received a generic message from GitHub saying:

The page build failed for the master branch with the following error:

Page build failed. For more information, see Troubleshooting Jekyll build errors for GitHub Pages sites - GitHub Docs.

For information on troubleshooting Jekyll see:

Troubleshooting Jekyll build errors for GitHub Pages sites - GitHub Docs

If you have any questions you can submit a request at Sign in for Software Support and Product Help - GitHub Support

And this on the merge request, rerunning does nothing:

The jekyll action script went thru each step perfectly as well:

Any idea why this is happening? I am really disappointed it failed after all that.

I think GH is trying to still build the site but the whole point of this was to avoid this because i am using unsupported plugins…

Okay so the GH Action is meant to put a file in the gh-pages branch which will prevent Jekyll from running and just serve static files.

.nojekyll

Make sure that file is there on the Branch.

And make sure you edit your repo settings to serve from gh-pages and not main