我正在使用GitLab来托管我的静态页面!每次配置.gitlab-ci.yml文件时,我都会收到以下错误:“找不到Gemfile”
下面是cmd的输出

下面是.gitlab-ci.yml文件的id
image: ruby:2.3
before_script:
- bundle install
job:
script:
- gem install jekyll
- jekyll build
pages:
stage: deploy
script:
- bundle install
- bundle exec jekyll build -d public
artifacts:
paths:
- public
only:
- master
test:
stage: test
script:
- bundle install
- bundle exec jekyll build -d test
artifacts:
paths:
- test
except:
- master发布于 2017-11-05 07:21:27
在您的配置中,我看到了不同安装说明的混合:
bundle install (在before_script)bundle install中(同样,在页面中部署script)gem install jekyll Gemfile是bundle命令所必需的,它应该主要指定对jekyll的依赖关系(因此也是重复的)
推荐的解决方案:我建议您尝试使用gitlab pages sample中的配置
映像: ruby:2.3变量: JEKYLL_ENV:生产before_script:-捆绑包安装测试:阶段:测试脚本:-捆绑包执行jekyll构建-d测试工件:路径:-测试例外:-母版页:阶段:部署脚本:-捆绑包exec jekyll构建-d公共工件:路径:-仅限公共:- bundle exec jekyll
source "https://rubygems.org“ruby RUBY_VERSION #这将有助于确保正确的Jekyll版本正在运行。gem "jekyll","3.4.0“# Windows不包含zoneinfo文件,所以捆绑tzinfo-data gem 'tzinfo-data',platform::mingw,:mswin,:x64_mingw,:jruby
https://stackoverflow.com/questions/46476022
复制相似问题