Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deploy failing -- unable to load jekyll? #3028

Open
2 tasks done
rmastand opened this issue Feb 21, 2025 · 1 comment
Open
2 tasks done

Deploy failing -- unable to load jekyll? #3028

rmastand opened this issue Feb 21, 2025 · 1 comment
Labels

Comments

@rmastand
Copy link

Have you checked that your issue isn't already filed?

  • I read through FAQ and searched through the past issues, none of which addressed my issue.
  • Yes, I have checked that this issue isn't already filed.

Bug description

My deployment is failing

How to reproduce the bug

I am trying to do some simple edits to my homepage. The last time I successfully pushed edits was in October of 2024. Today, my deploys failed with warnings Your workflow is using a version of actions/cache that is scheduled for deprecation, actions/cache@v2. Please update your workflow to use either v3 or v4 of actions/cache to avoid interruptions.

and

The set-output command is deprecated and will be disabled soon. Please upgrade to using Environment Files.. I changed my deploy.yml file to use actions/cache@v4 and I changed the syntax of the set-output commands to match the syntax on this site.

However, the deployments are failing with the error message given below.

Error messages and logs

Run yes | bash bin/deploy --verbose  --src master --deploy gh-pages
+ shift
+ [[ [4](https://github.com/rmastand/rmastand.github.io/actions/runs/13450362651/job/37583650781#step:7:5) > 0 ]]
+ key=--src
+ case $key in
+ SRC_BRANCH=master
+ shift
+ shift
+ [[ 2 > 0 ]]
+ key=--deploy
+ case $key in
+ DEPLOY_BRANCH=gh-pages
+ shift
+ shift
+ [[ 0 > 0 ]]
+ set -e
+ echo Deploying...
+ echo 'Source branch: master'
+ echo 'Deploy branch: gh-pages'
+ read -r -p 'Do you want to proceed? [y/N] ' response
+ [[ ! y =~ ^([yY][eE][sS]|[yY])+$ ]]
+ git diff-index --quiet HEAD --
Deploying...
Source branch: master
Deploy branch: gh-pages
++ git ls-files --exclude-standard --others
+ test -z ''
++ git branch
++ grep master
++ tr ' ' '\n'
++ tail -1
+ '[' master ']'
+ git checkout master
Already on 'master'
Your branch is up to date with 'origin/master'.
++ git branch
++ grep gh-pages
+ '[' ']'
+ git checkout -b gh-pages
Switched to a new branch 'gh-pages'
+ export JEKYLL_ENV=production
+ JEKYLL_ENV=production
+ bundle exec jekyll build
bundler: failed to load command: jekyll (/home/runner/work/rmastand.github.io/rmastand.github.io/vendor/bundle/ruby/3.0.0/bin/jekyll)
/opt/hostedtoolcache/Ruby/3.0.2/x64/lib/ruby/gems/3.0.0/gems/bundler-2.[5](https://github.com/rmastand/rmastand.github.io/actions/runs/13450362651/job/37583650781#step:7:6).23/lib/bundler/runtime.rb:299:in `check_for_activated_spec!': You have already activated uri 0.10.1, but your Gemfile requires uri 1.0.2. Since uri is a default gem, you can either remove your dependency on it or try updating to a newer version of bundler that supports uri as a default gem. (Gem::LoadError)
	from /opt/hostedtoolcache/Ruby/3.0.2/x[6](https://github.com/rmastand/rmastand.github.io/actions/runs/13450362651/job/37583650781#step:7:7)4/lib/ruby/gems/3.0.0/gems/bundler-2.5.23/lib/bundler/runtime.rb:25:in `block in setup'
	from /opt/hostedtoolcache/Ruby/3.0.2/x64/lib/ruby/gems/3.0.0/gems/bundler-2.5.23/lib/bundler/spec_set.rb:191:in `each'
	from /opt/hostedtoolcache/Ruby/3.0.2/x64/lib/ruby/gems/3.0.0/gems/bundler-2.5.23/lib/bundler/spec_set.rb:191:in `each'
	from /opt/hostedtoolcache/Ruby/3.0.2/x64/lib/ruby/gems/3.0.0/gems/bundler-2.5.23/lib/bundler/runtime.rb:24:in `map'
	from /opt/hostedtoolcache/Ruby/3.0.2/x64/lib/ruby/gems/3.0.0/gems/bundler-2.5.23/lib/bundler/runtime.rb:24:in `setup'
	from /opt/hostedtoolcache/Ruby/3.0.2/x64/lib/ruby/gems/3.0.0/gems/bundler-2.5.23/lib/bundler.rb:164:in `setup'
	from /opt/hostedtoolcache/Ruby/3.0.2/x64/lib/ruby/gems/3.0.0/gems/bundler-2.5.23/lib/bundler/setup.rb:32:in `block in <top (required)>'
	from /opt/hostedtoolcache/Ruby/3.0.2/x64/lib/ruby/gems/3.0.0/gems/bundler-2.5.23/lib/bundler/ui/shell.rb:1[7](https://github.com/rmastand/rmastand.github.io/actions/runs/13450362651/job/37583650781#step:7:8)3:in `with_level'
	from /opt/hostedtoolcache/Ruby/3.0.2/x64/lib/ruby/gems/3.0.0/gems/bundler-2.5.23/lib/bundler/ui/shell.rb:119:in `silence'
	from /opt/hostedtoolcache/Ruby/3.0.2/x64/lib/ruby/gems/3.0.0/gems/bundler-2.5.23/lib/bundler/setup.rb:32:in `<top (required)>'
	from /opt/hostedtoolcache/Ruby/3.0.2/x64/lib/ruby/gems/3.0.0/gems/bundler-2.5.23/lib/bundler/cli/exec.rb:56:in `require_relative'
	from /opt/hostedtoolcache/Ruby/3.0.2/x64/lib/ruby/gems/3.0.0/gems/bundler-2.5.23/lib/bundler/cli/exec.rb:56:in `kernel_load'
	from /opt/hostedtoolcache/Ruby/3.0.2/x64/lib/ruby/gems/3.0.0/gems/bundler-2.5.23/lib/bundler/cli/exec.rb:23:in `run'
	from /opt/hostedtoolcache/Ruby/3.0.2/x64/lib/ruby/gems/3.0.0/gems/bundler-2.5.23/lib/bundler/cli.rb:456:in `exec'
	from /opt/hostedtoolcache/Ruby/3.0.2/x64/lib/ruby/gems/3.0.0/gems/bundler-2.5.23/lib/bundler/vendor/thor/lib/thor/command.rb:2[8](https://github.com/rmastand/rmastand.github.io/actions/runs/13450362651/job/37583650781#step:7:9):in `run'
	from /opt/hostedtoolcache/Ruby/3.0.2/x64/lib/ruby/gems/3.0.0/gems/bundler-2.5.23/lib/bundler/vendor/thor/lib/thor/invocation.rb:127:in `invoke_command'
	from /opt/hostedtoolcache/Ruby/3.0.2/x64/lib/ruby/gems/3.0.0/gems/bundler-2.5.23/lib/bundler/vendor/thor/lib/thor.rb:527:in `dispatch'
	from /opt/hostedtoolcache/Ruby/3.0.2/x64/lib/ruby/gems/3.0.0/gems/bundler-2.5.23/lib/bundler/cli.rb:35:in `dispatch'
	from /opt/hostedtoolcache/Ruby/3.0.2/x64/lib/ruby/gems/3.0.0/gems/bundler-2.5.23/lib/bundler/vendor/thor/lib/thor/base.rb:584:in `start'
	from /opt/hostedtoolcache/Ruby/3.0.2/x64/lib/ruby/gems/3.0.0/gems/bundler-2.5.23/lib/bundler/cli.rb:2[9](https://github.com/rmastand/rmastand.github.io/actions/runs/13450362651/job/37583650781#step:7:10):in `start'
	from /opt/hostedtoolcache/Ruby/3.0.2/x64/lib/ruby/gems/3.0.0/gems/bundler-2.5.23/exe/bundle:28:in `block in <top (required)>'
	from /opt/hostedtoolcache/Ruby/3.0.2/x64/lib/ruby/gems/3.0.0/gems/bundler-2.5.23/lib/bundler/friendly_errors.rb:[11](https://github.com/rmastand/rmastand.github.io/actions/runs/13450362651/job/37583650781#step:7:12)7:in `with_friendly_errors'
	from /opt/hostedtoolcache/Ruby/3.0.2/x64/lib/ruby/gems/3.0.0/gems/bundler-2.5.23/exe/bundle:20:in `<top (required)>'
	from /opt/hostedtoolcache/Ruby/3.0.2/x64/bin/bundle:23:in `load'
	from /opt/hostedtoolcache/Ruby/3.0.2/x64/bin/bundle:[23](https://github.com/rmastand/rmastand.github.io/actions/runs/13450362651/job/37583650781#step:7:24):in `<main>'
yes: standard output: Broken pipe
Error: Process completed with exit code 1.

What operating system are you using?

Mac

Where are you seeing the problem on?

Running locally without Docker

More info

This is the deploy.yml code that I am using:

name: deploy

on:
  push:
    branches:
      - master
      - main
  pull_request:
    branches:
      - master
      - main

jobs:
  deploy:
    runs-on: ubuntu-latest
    steps:
    - name: Checkout code
      uses: actions/checkout@v2
    - name: Setup Ruby
      uses: ruby/setup-ruby@v1
      with:
        ruby-version: '3.0.2'
    - name: Enable bundler cache
      uses: actions/cache@v4
      with:
        path: vendor/bundle
        key: ${{ runner.os }}-gems-${{ hashFiles('**/Gemfile.lock') }}
        restore-keys: |
          ${{ runner.os }}-gems-
    - name: Install deps
      run: |
        gem install bundler
        bundle config path vendor/bundle
        bundle install --jobs 4 --retry 3
        npm install -g mermaid.cli
    - name: Setup deploy options
    echo "{name}={value}" >> $GITHUB_OUTPUT
      id: setup
      run: |
        git config --global user.name "GitHub Action"
        git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com"
        if [[ ${GITHUB_REF} = refs/pull/*/merge ]]; then # pull request
          echo "SRC_BRANCH=${GITHUB_HEAD_REF}" >> $GITHUB_OUTPUT
          echo "NO_PUSH=--no-push" >> $GITHUB_OUTPUT
        elif [[ ${GITHUB_REF} = refs/heads/* ]]; then # branch, e.g. master, source etc
          echo "SRC_BRANCH=${GITHUB_REF#refs/heads/}" >> $GITHUB_OUTPUT
        fi
        echo "DEPLOY_BRANCH=gh-pages" >> $GITHUB_OUTPUT
    - name: Deploy website 
      run:  yes | bash bin/deploy --verbose ${{ steps.setup.outputs.NO_PUSH }}
                    --src ${{ steps.setup.outputs.SRC_BRANCH }} 
                    --deploy ${{ steps.setup.outputs.DEPLOY_BRANCH }} 

@rmastand rmastand added the bug label Feb 21, 2025
@george-gca
Copy link
Collaborator

Your code must be based on a really old version. Have you tried updating your deploy.yml to the latest version, but keeping some of your actual code? For instance, replace your entirely deploy.yml with the current one, but add this line:

npm install -g mermaid.cli

Since we removed mermaid as a dependency a while ago. Also, you might need to update your Gemfile and Gemfile.lock versions. You are probably using a lot of older libraries that have been/are going to be deprecated.

Of course, I'd recommend updating your repository to the latest version, but that probably will require some work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants