# Can't deploy site to GitHub pages

**URL:** <https://talk.jekyllrb.com/t/cant-deploy-site-to-github-pages/7306>\
**Category:** Help\
**Created:** [May 2, 2022, 2:03pm UTC](https://talk.jekyllrb.com/t/cant-deploy-site-to-github-pages/7306 "2022-05-02T14:03:47Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![EmilySeville7cfg](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.jekyllrb.com/emilyseville7cfg/32/6537_2.png) [@EmilySeville7cfg](https://talk.jekyllrb.com/u/EmilySeville7cfg)\
**Post date:** [May 2, 2022, 2:03pm UTC](https://talk.jekyllrb.com/t/cant-deploy-site-to-github-pages/7306/1 "2022-05-02T14:03:47Z")

</div>

Hello! When I want to deploy [my personal site](https://github.com/EmilySeville7cfg/EmilySeville7cfg.github.io) I obtain [this](https://github.com/EmilySeville7cfg/EmilySeville7cfg.github.io/runs/6258298549?check_suite_focus=true#step:4:10) error:

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

```

How to fix this problem? Everything works locally. My [cd.yml](https://github.com/EmilySeville7cfg/EmilySeville7cfg.github.io/blob/master/.github/workflows/cd.yml) is:

```nohighlight
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](https://jekyllrb.com/docs/continuous-integration/github-actions/) template and slightly changed it: I used new versions of actions.

I use `Ruby 2.7.0p0` and Jekyll `4.2.2`.

---

<div class="post-metadata">

**Author:** ![ckruse](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.jekyllrb.com/ckruse/32/16_2.png) [@ckruse](https://talk.jekyllrb.com/u/ckruse)\
**Post date:** [May 2, 2022, 4:50pm UTC](https://talk.jekyllrb.com/t/cant-deploy-site-to-github-pages/7306/2 "2022-05-02T16:50:39Z")

</div>

Looks like you might have declared two themes in your `_config.yml`? The curious thing is why it still works locally 🤷‍♂️

> <https://github.com/EmilySeville7cfg/EmilySeville7cfg.github.io/blob/master/Gemfile#L12>

> <https://github.com/EmilySeville7cfg/EmilySeville7cfg.github.io/blob/master/Gemfile#L36>

---

<div class="post-metadata">

**Author:** ![EmilySeville7cfg](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.jekyllrb.com/emilyseville7cfg/32/6537_2.png) [@EmilySeville7cfg](https://talk.jekyllrb.com/u/EmilySeville7cfg)\
**Post date:** [May 2, 2022, 5:40pm UTC](https://talk.jekyllrb.com/t/cant-deploy-site-to-github-pages/7306/3 "2022-05-02T17:40:21Z")

</div>

This [didn’t resolve](https://github.com/EmilySeville7cfg/EmilySeville7cfg.github.io/runs/6261557325?check_suite_focus=true#step:4:10) my problem.

---

<div class="post-metadata">

**Author:** ![rdyar](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.jekyllrb.com/rdyar/32/710_2.png) [@rdyar](https://talk.jekyllrb.com/u/rdyar)\
**Post date:** [May 2, 2022, 6:49pm UTC](https://talk.jekyllrb.com/t/cant-deploy-site-to-github-pages/7306/4 "2022-05-02T18:49:33Z")

</div>

> [@EmilySeville7cfg](#):
>
> I use `Ruby 2.7.0p0` and Jekyll `4.2.2` .

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?

---

<div class="post-metadata">

**Author:** ![ashmaroli](https://avatars.discourse-cdn.com/v4/letter/a/df705f/32.png) [@ashmaroli](https://talk.jekyllrb.com/u/ashmaroli)\
**Post date:** [May 3, 2022, 4:10pm UTC](https://talk.jekyllrb.com/t/cant-deploy-site-to-github-pages/7306/5 "2022-05-03T16:10:49Z")

</div>

@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._

---

<div class="post-metadata">

**Author:** ![list4c](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.jekyllrb.com/list4c/32/4641_2.png) [@list4c](https://talk.jekyllrb.com/u/list4c)\
**Post date:** [May 4, 2022, 9:06pm UTC](https://talk.jekyllrb.com/t/cant-deploy-site-to-github-pages/7306/6 "2022-05-04T21:06:44Z")

</div>

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](https://github.com/EmilySeville7cfg/EmilySeville7cfg.github.io/blob/0960a8e9d92965530292f70cf3a8c1e0732a9be6/Gemfile#L11-L13)

- 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](https://github.com/list4c/list4c.github.io/tree/main)). Good luck!

---

<div class="post-metadata">

**Author:** ![BillRaymond](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.jekyllrb.com/billraymond/32/5963_2.png) [@BillRaymond](https://talk.jekyllrb.com/u/BillRaymond)\
**Post date:** [May 4, 2022, 9:40pm UTC](https://talk.jekyllrb.com/t/cant-deploy-site-to-github-pages/7306/7 "2022-05-04T21:40:38Z")

</div>

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

> [@list4c](#):
>
> - 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](https://github.com/EmilySeville7cfg/EmilySeville7cfg.github.io/blob/0960a8e9d92965530292f70cf3a8c1e0732a9be6/Gemfile#L11-L13)

---

<div class="post-metadata">

**Author:** ![BillRaymond](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.jekyllrb.com/billraymond/32/5963_2.png) [@BillRaymond](https://talk.jekyllrb.com/u/BillRaymond)\
**Post date:** [May 4, 2022, 10:49pm UTC](https://talk.jekyllrb.com/t/cant-deploy-site-to-github-pages/7306/8 "2022-05-04T22:49:24Z")

</div>

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

```auto
bundle install
bundle update

```

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

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

```

Under dependencies, **remove**

```auto
  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):

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

```auto
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!
