Can't deploy site to GitHub pages

Hello! When I want to deploy my personal site I obtain this error:

The minimal-mistakes-jekyll theme could not be found. (Jekyll::Errors::MissingDependencyException)

How to fix this problem? Everything works locally. My cd.yml is:

name: Continuous Deployment
on:
  push:
    branches: [ master ]
  workflow_dispatch:

jobs:
  github-pages:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v3
      - uses: actions/cache@v3
        with:
          path: vendor/bundle
          key: ${{ runner.os }}-gems-${{ hashFiles('**/Gemfile') }}
          restore-keys: "{{ runner.os }}-gems-"
      - uses: helaili/jekyll-action@v2
        with:
          token: ${{ secrets.GITHUB_TOKEN }}

I’ve used this template and slightly changed it: I used new versions of actions.

I use Ruby 2.7.0p0 and Jekyll 4.2.2.

Looks like you might have declared two themes in your _config.yml? The curious thing is why it still works locally :man_shrugging:

1 Like

This didn’t resolve my problem.

not sure if this is the problem but in the build log you linked to it looks like it is using jekyll 3.9.2

from /usr/local/bundle/gems/jekyll-3.9.2/lib/jekyll/theme.rb:81:in gemspec’`

I’m not experienced with GH actions but I did look at the action you are using from helaili and it seems very complicated? are they all like that? I would think it could be a lot simpler.

Can you try running it locally with 3.9.2? maybe you’ll get the same error?

@EmilySeville7cfg You have misunderstood the use of GitHub Actions deploy workflow.

Your gh-pages branch should not be a Jekyll source directory. GitHub will attempt to run its native deploy tool if the branch gets detected as a Jekyll source

To rectify, clean the branch to contain nothing but a .nojekyll file.

1 Like

Hi @EmilySeville7cfg

I’ve recently deployed my blog to Github pages. I have minimal additions there, most is the skeleton provided by jekyll new.

I see a couple of things, when comparing your repos and mine:

  • github-pages is not listed as a plugin in your config.yml

  • There is a gem in the gemfile called github-pages and it should be uncommented, while the jekyll gem commented out - see here

  • And the previous comment is also right. The gh-pages branch only contains the data of deployed site, no gemfiles.

Feel free to check my configuration (link). Good luck!

@list4c I do not think these first two bullets (see below) are pertinent. That is because @EmilySeville7cfg is using a GitHub Action to build the site. When you do that, you are now using GitHub Pages as a website host as opposed to a Jekyll site builder.

@EmilySeville7cfg I downloaded your repo and ran the action on my repo successfully. If you are using the repo locally, I suggest you run:

bundle install
bundle update

If you do not have that capability, modify the gemfile.lock and remove the following lines:

    minima (2.5.1)
      jekyll (>= 3.5, < 5.0)
      jekyll-feed (~> 0.9)
      jekyll-seo-tag (~> 2.1)

Under dependencies, remove

  minima (~> 2.5)

Here is the new gemfile.lock I have if you want to copy and paste (there are some additional items that were updated to newer versions than yours):

GEM
  remote: https://rubygems.org/
  specs:
    activesupport (7.0.2.4)
      concurrent-ruby (~> 1.0, >= 1.0.2)
      i18n (>= 1.6, < 2)
      minitest (>= 5.1)
      tzinfo (~> 2.0)
    addressable (2.8.0)
      public_suffix (>= 2.0.2, < 5.0)
    colorator (1.1.0)
    concurrent-ruby (1.1.10)
    em-websocket (0.5.3)
      eventmachine (>= 0.12.9)
      http_parser.rb (~> 0)
    eventmachine (1.2.7)
    faraday (1.10.0)
      faraday-em_http (~> 1.0)
      faraday-em_synchrony (~> 1.0)
      faraday-excon (~> 1.1)
      faraday-httpclient (~> 1.0)
      faraday-multipart (~> 1.0)
      faraday-net_http (~> 1.0)
      faraday-net_http_persistent (~> 1.0)
      faraday-patron (~> 1.0)
      faraday-rack (~> 1.0)
      faraday-retry (~> 1.0)
      ruby2_keywords (>= 0.0.4)
    faraday-em_http (1.0.0)
    faraday-em_synchrony (1.0.0)
    faraday-excon (1.1.0)
    faraday-httpclient (1.0.1)
    faraday-multipart (1.0.3)
      multipart-post (>= 1.2, < 3)
    faraday-net_http (1.0.1)
    faraday-net_http_persistent (1.2.0)
    faraday-patron (1.0.0)
    faraday-rack (1.0.0)
    faraday-retry (1.0.3)
    ffi (1.15.5)
    forwardable-extended (2.6.0)
    gemoji (3.0.1)
    html-pipeline (2.14.1)
      activesupport (>= 2)
      nokogiri (>= 1.4)
    http_parser.rb (0.8.0)
    i18n (1.10.0)
      concurrent-ruby (~> 1.0)
    jekyll (4.2.2)
      addressable (~> 2.4)
      colorator (~> 1.0)
      em-websocket (~> 0.5)
      i18n (~> 1.0)
      jekyll-sass-converter (~> 2.0)
      jekyll-watch (~> 2.0)
      kramdown (~> 2.3)
      kramdown-parser-gfm (~> 1.0)
      liquid (~> 4.0)
      mercenary (~> 0.4.0)
      pathutil (~> 0.9)
      rouge (~> 3.0)
      safe_yaml (~> 1.0)
      terminal-table (~> 2.0)
    jekyll-feed (0.16.0)
      jekyll (>= 3.7, < 5.0)
    jekyll-gist (1.5.0)
      octokit (~> 4.2)
    jekyll-include-cache (0.2.1)
      jekyll (>= 3.7, < 5.0)
    jekyll-paginate (1.1.0)
    jekyll-sass-converter (2.2.0)
      sassc (> 2.0.1, < 3.0)
    jekyll-sitemap (1.4.0)
      jekyll (>= 3.7, < 5.0)
    jekyll-watch (2.2.1)
      listen (~> 3.0)
    jemoji (0.12.0)
      gemoji (~> 3.0)
      html-pipeline (~> 2.2)
      jekyll (>= 3.0, < 5.0)
    kramdown (2.4.0)
      rexml
    kramdown-parser-gfm (1.1.0)
      kramdown (~> 2.0)
    liquid (4.0.3)
    listen (3.7.1)
      rb-fsevent (~> 0.10, >= 0.10.3)
      rb-inotify (~> 0.9, >= 0.9.10)
    mercenary (0.4.0)
    mini_portile2 (2.8.0)
    minimal-mistakes-jekyll (4.24.0)
      jekyll (>= 3.7, < 5.0)
      jekyll-feed (~> 0.1)
      jekyll-gist (~> 1.5)
      jekyll-include-cache (~> 0.1)
      jekyll-paginate (~> 1.1)
      jekyll-sitemap (~> 1.3)
    minitest (5.15.0)
    multipart-post (2.1.1)
    nokogiri (1.13.5)
      mini_portile2 (~> 2.8.0)
      racc (~> 1.4)
    nokogiri (1.13.5-x86_64-linux)
      racc (~> 1.4)
    octokit (4.22.0)
      faraday (>= 0.9)
      sawyer (~> 0.8.0, >= 0.5.3)
    pathutil (0.16.2)
      forwardable-extended (~> 2.6)
    public_suffix (4.0.7)
    racc (1.6.0)
    rb-fsevent (0.11.1)
    rb-inotify (0.10.1)
      ffi (~> 1.0)
    rexml (3.2.5)
    rouge (3.28.0)
    ruby2_keywords (0.0.5)
    safe_yaml (1.0.5)
    sassc (2.4.0)
      ffi (~> 1.9)
    sawyer (0.8.2)
      addressable (>= 2.3.5)
      faraday (> 0.8, < 2.0)
    terminal-table (2.0.0)
      unicode-display_width (~> 1.1, >= 1.1.1)
    tzinfo (2.0.4)
      concurrent-ruby (~> 1.0)
    unicode-display_width (1.8.0)

PLATFORMS
  ruby
  x86_64-linux

DEPENDENCIES
  http_parser.rb (~> 0.6.0)
  jekyll (~> 4.2.2)
  jekyll-feed (~> 0.12)
  jemoji
  minimal-mistakes-jekyll
  tzinfo (~> 1.2)
  tzinfo-data
  wdm (~> 0.1.1)

BUNDLED WITH
   2.3.9

I did notice another problem with your site and that is the _config.yml file. It does not contain a baseurl. You should make sure you update your file to include that. Here are the two important settings you need (note that you already have a url):

_config.yml

baseurl: "" # the subpath of your site, e.g. /blog
url: "" # the base hostname & protocol for your site, e.g. http://example.com

Even if you do not have a baseurl, I suggest you add that line with double-quotes.

Finally, while the action did technically run, it seems to have copied your Jekyll site over to the new gh-pages, but did not actually build your Jekyll site. I am not familiar with this particular action you are using so don’t know that I can help debug why your site is not building, but it does run!

1 Like