Github Jekyll工作流程问题

问题描述

我试图将“ Jekyll”工作流程添加到我在Github中的存储库中,但是每次运行时都会将其标记为失败。

这是一条错误消息,我试图从排除(_config.yml)中删除Gemfile.lock,但这没有帮助...这是我要向其添加工作流的存储库:{ {3}}

Build the site in the jekyll/builder container
##[error]Process completed with exit code 23.
Fetching i18n 0.9.5
Installing i18n 0.9.5
Using rb-fsevent 0.10.4
Using rb-inotify 0.10.1
Fetching sass-listen 4.0.0
Installing sass-listen 4.0.0
Fetching sass 3.7.4
Installing sass 3.7.4
Fetching jekyll-sass-converter 1.5.2
Installing jekyll-sass-converter 1.5.2
Using listen 3.2.1
Using jekyll-watch 2.2.1
Fetching kramdown 1.17.0
Installing kramdown 1.17.0
Using liquid 4.0.3
Using mercenary 0.3.6
Using pathutil 0.16.2
Fetching rouge 3.22.0
Installing rouge 3.22.0
Using safe_yaml 1.0.5
Fetching jekyll 3.8.7
Installing jekyll 3.8.7
Fetching jekyll-feed 0.15.0
Installing jekyll-feed 0.15.0
Using jekyll-paginate 1.1.0
There was an error while trying to write to `/srv/jekyll/Gemfile.lock`. It is
likely that you need to grant write permissions for that path.
##[error]Process completed with exit code 23.

Github error

解决方法

经过多次尝试修复测试之后,我终于找到了解决方案,谢谢@fredrik *

这是我的工作流程文件:

name: Jekyll

on:
  push:
    branches: [ master ]
  pull_request:
    branches: [ master ]

jobs:
  build:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v2
    - name: Build the site in the jekyll/builder container
      run: |
        docker run \
        -v ${{ github.workspace }}:/srv/jekyll -v ${{ github.workspace }}/_site:/srv/jekyll/_site \
        jekyll/builder:latest /bin/bash -c "chmod a+w /srv/jekyll/Gemfile.lock && chmod 777 /srv/jekyll && jekyll build --future"

和我的Gemfile

source "https://rubygems.org"
ruby RUBY_VERSION
gem "jekyll","~> 3.8.5"
gem "minima","~> 2.5",">= 2.5.1"
group :jekyll_plugins do
gem "jekyll-feed","~> 0.6"
gem "jekyll-paginate","~> 1.1"
end

*在评论中回答:“ here,您有我的Google搜索。从字面上看,我只是错误并粘贴到Google中。”

相关问答

依赖报错 idea导入项目后依赖报错,解决方案:https://blog....
错误1:代码生成器依赖和mybatis依赖冲突 启动项目时报错如下...
错误1:gradle项目控制台输出为乱码 # 解决方案:https://bl...
错误还原:在查询的过程中,传入的workType为0时,该条件不起...
报错如下,gcc版本太低 ^ server.c:5346:31: 错误:‘struct...