Blog研究六:博客部署失败
最近一段时间发现推送到github上的博客一直没有更新,由于暂时比较忙,于是没处理,之前还以为我提交的内容有问题,现在查看了下github上的报错,原来是环境变化导致的问题
Error: The current runner (ubuntu-24.04-x64) was detected as self-hosted because the platform does not match a GitHub-hosted runner image (or that image is deprecated and no longer supported).
参考:
解决方案,按照提示将博客项目的/xxxx/xxx/.github/workflows/jekyll.yml
文件替换下 runs-on: ubuntu-latest
1
2
3
4
jobs:
# Build job
build:
runs-on: ubuntu-22.04
报错:
The following platform specific gems are getting installed, yet the >lockfile includes only their generic ruby version:
- zeitwerk-2.7.1
- sass-embedded-1.83.4-x86_64-linux-gnu Please run
bundle lock --normalize-platforms
and commit the resulting lockfile. Alternatively, you may runbundle lock --add-platform <list-of-platforms-that-you-want-to-support>
zeitwerk-2.7.1 requires ruby version >= 3.2, which is incompatible with the current version, 3.1.4 Error: The process ‘/opt/hostedtoolcache/Ruby/3.1.4/x64/bin/bundle’ failed with exit code 5
解决方案: 按照提示将博客项目的/xxxx/xxx/.github/workflows/jekyll.yml
文件替换下 build: steps: with: ruby-version: '3.1'
替换为提示的3.2.2
参考:
1
2
3
4
5
6
7
8
9
10
11
jobs:
# Build job
build:
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Ruby
uses: ruby/setup-ruby@8575951200e472d5f2d95c625da0c7bec8217c42 # v1.161.0
with:
ruby-version: '3.2.2' # Not needed with a .ruby-version file
This post is licensed under CC BY 4.0 by the author.