# Paginate-v2 with github pages confusion

**URL:** <https://talk.jekyllrb.com/t/paginate-v2-with-github-pages-confusion/6471>\
**Category:** Uncategorized\
**Created:** [September 22, 2021, 5:29pm UTC](https://talk.jekyllrb.com/t/paginate-v2-with-github-pages-confusion/6471 "2021-09-22T17:29:40Z")\
**Posts on this page:** 6\
**Page:** 2

<div class="post-metadata">

**Author:** ![guy](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.jekyllrb.com/guy/32/3917_2.png) [@guy](https://talk.jekyllrb.com/u/guy)\
**Post date:** [September 30, 2021, 6:44pm UTC](https://talk.jekyllrb.com/t/paginate-v2-with-github-pages-confusion/6471/21 "2021-09-30T18:44:43Z")

</div>

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]`

---

<div class="post-metadata">

**Author:** ![guy](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.jekyllrb.com/guy/32/3917_2.png) [@guy](https://talk.jekyllrb.com/u/guy)\
**Post date:** [September 30, 2021, 7:10pm UTC](https://talk.jekyllrb.com/t/paginate-v2-with-github-pages-confusion/6471/22 "2021-09-30T19:10:50Z")

</div>

@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,

---

<div class="post-metadata">

**Author:** ![MichaelCurrin](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.jekyllrb.com/michaelcurrin/32/2340_2.png) [@MichaelCurrin](https://talk.jekyllrb.com/u/MichaelCurrin)\
**Post date:** [September 30, 2021, 8:30pm UTC](https://talk.jekyllrb.com/t/paginate-v2-with-github-pages-confusion/6471/23 "2021-09-30T20:30:23Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![guy](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.jekyllrb.com/guy/32/3917_2.png) [@guy](https://talk.jekyllrb.com/u/guy)\
**Post date:** [September 30, 2021, 9:38pm UTC](https://talk.jekyllrb.com/t/paginate-v2-with-github-pages-confusion/6471/24 "2021-09-30T21:38:39Z")

</div>

@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](https://docs.github.com/github/working-with-github-pages/troubleshooting-jekyll-build-errors-for-github-pages-sites#troubleshooting-build-errors).
> 
> For information on troubleshooting Jekyll see:
> 
> [Troubleshooting Jekyll build errors for GitHub Pages sites - GitHub Docs](https://docs.github.com/articles/troubleshooting-jekyll-builds)
> 
> If you have any questions you can submit a request at [Sign in for Software Support and Product Help - GitHub Support](https://support.github.com/contact?tags=dotcom-pages&repo_id=276943843&page_build_id=283110259)

And this on the merge request, rerunning does nothing:

 ![image](https://canada1.discourse-cdn.com/flex030/uploads/jekyllrb/original/2X/b/b6c91f1cc46fdfa84c9c8b8ccd715b2f259da562.png)

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

 ![image](https://canada1.discourse-cdn.com/flex030/uploads/jekyllrb/original/2X/e/e04042698e07dcf7404d09340d1d691d350a9f66.png)

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

---

<div class="post-metadata">

**Author:** ![guy](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.jekyllrb.com/guy/32/3917_2.png) [@guy](https://talk.jekyllrb.com/u/guy)\
**Post date:** [September 30, 2021, 10:23pm UTC](https://talk.jekyllrb.com/t/paginate-v2-with-github-pages-confusion/6471/25 "2021-09-30T22:23:23Z")

</div>

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…

---

<div class="post-metadata">

**Author:** ![MichaelCurrin](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.jekyllrb.com/michaelcurrin/32/2340_2.png) [@MichaelCurrin](https://talk.jekyllrb.com/u/MichaelCurrin)\
**Post date:** [October 1, 2021, 3:02pm UTC](https://talk.jekyllrb.com/t/paginate-v2-with-github-pages-confusion/6471/26 "2021-10-01T15:02:09Z")

</div>

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`

> **[GitHub - MichaelCurrin/jekyll-gh-actions-quickstart at gh-pages](https://github.com/MichaelCurrin/jekyll-gh-actions-quickstart/tree/gh-pages)**
>
> gh-pages

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

[Previous page](https://talk.jekyllrb.com/t/paginate-v2-with-github-pages-confusion/6471.md?page=1)
