I keep getting build and deployment errors while trying to publish my gh pages, it works locally, does anyone could help me?
I'm using Jekyll al-folio for my webpage. and the error I'm getting while trying to publish my gh pages is:
github-pages can't satisfy your Gemfile's dependencies.
let me know if you need any more information.
I did everything that I could find, I myself had the same problem almost a year ago and I posted the solution, but that's not working for me anymore. I used bundle update according to one solution to get an updated gemfile.lock but it didn't work either.
According to one comment, since I didn't have any gh-pages branch, I created one, and changed the branch in pages setting from main to gh-pages, I still get the same error message, and build and deployment fails.
This is caused by this change in the jekyll-build-pages action, which is what the default GitHub Pages deployment workflow uses.
The script runs
bundle checkto see if the default GitHub Pages dependencies loaded with the pages-gem can satisfy the dependencies somebody might have in the Gemfile in their repository.The main reason for this warning is that people often set up custom dependencies locally, but any local Gemfile is entirely ignored in the default deployment method – and then they're surprised when their plugins don't work. This warning is meant to make that more clear.
Since this change, the warning also comes with output about which gems specifically cause the issue.
In my case, I thought my Gemfile didn't introduce anything that isn't part of the pages-gem, but the build process uses system libraries for Nokogiri instead of installing the gem, which can cause the warning.
Without seeing your Gemfile, we can only guess, but looking at the dependencies of the al-folio theme and comparing them to the default dependency versions of GitHub Pages can give us an idea.
The theme isn't published as a Gem but has about a dozen dependencies in its Gemfile that are not in pages-gem (classifier-reborn, jekyll-archives, jekyll-diagrams, ...).
To use this theme, you have to switch to publishing your site using GitHub Actions; there's a helpful official starter workflow for this.