How to setup Gitlab CI bundle exec dato jekyll build?

I have difficulty to solve datocms build with Gitlab Jekyll
All are already setup , runner with webhook.
This is the pipeline job result here
Running with gitlab-runner 12.9.0 (4c96e5ad)
on datocms-runner q2ohGFi5
Preparing the “docker” executor
00:02
Using Docker executor with image ruby:2.6 …
Pulling docker image ruby:2.6 …
Using docker image sha256:14ffe9b9c2e25db4dc2b75f0399ba69175dde380bdf62595df120769cba66313 for ruby:2.6 …
Preparing environment
00:03
Running on runner-q2ohGFi5-project-344-concurrent-0 via gitlab…
Getting source from Git repository
00:05
Fetching changes with git depth set to 50…
Reinitialized existing Git repository in /builds/lohnsonok/datocms-project/.git/
From

  • [new ref] refs/pipelines/742 → refs/pipelines/742
    Checking out 9e276034 as master…
    Removing .env
    Removing .gitignore
    Removing .jekyll-cache/
    Removing Gemfile
    Removing Gemfile.lock
    Removing _posts/
    Removing public/
    Removing vendor/
    Skipping Git submodules setup
    Restoring cache
    00:15
    Checking cache for default…
    No URL provided, cache will not be downloaded from shared cache server. Instead a local version of cache will be extracted.
    Successfully extracted cache
    Downloading artifacts
    00:06
    Running before_script and script
    05:17
    $ bundle init
    Writing new Gemfile to /builds/lohnsonok/datocms-project/Gemfile
    $ echo ‘gem “dato”’ >> Gemfile
    $ echo ‘gem “jekyll”, “4.0.0”’ >> Gemfile
    $ echo ‘gem “json”, “2.3.0”’ >> Gemfile
    $ gem install bundler
    Successfully installed bundler-2.1.4
    1 gem installed
    $ gem install dato
    Successfully installed multipart-post-2.1.1
    Successfully installed faraday-1.0.1
    Successfully installed faraday_middleware-1.0.0
    Successfully installed concurrent-ruby-1.1.6
    HEADS UP! i18n 1.1 changed fallbacks to exclude default locale.
    But that may break your application.
    If you are upgrading your Rails application from an older version of Rails:
    Please check your Rails app for ‘config.i18n.fallbacks = true’.
    If you’re using I18n (>= 1.1.0) and Rails (< 5.2.2), this should be
    ‘config.i18n.fallbacks = [I18n.default_locale]’.
    If not, fallbacks will be broken in your app by I18n 1.1.x.
    If you are starting a NEW Rails application, you can ignore this notice.
    For more info see:
    Successfully installed i18n-1.8.2
    Successfully installed thread_safe-0.3.6
    Successfully installed tzinfo-1.2.7
    Successfully installed zeitwerk-2.3.0
    Successfully installed activesupport-6.0.2.2
    Successfully installed public_suffix-4.0.3
    Successfully installed addressable-2.7.0
    Successfully installed thor-1.0.1
    Successfully installed imgix-3.2.1
    Successfully installed parslet-1.8.2
    Successfully installed toml-0.2.0
    Successfully installed cacert-0.5.0
    Successfully installed dotenv-2.7.5
    Successfully installed websocket-1.2.8
    Successfully installed pusher-client-0.6.2
    Successfully installed rb-fsevent-0.10.3
    Building native extensions. This could take a while…
    Successfully installed ffi-1.12.2
    Successfully installed rb-inotify-0.10.1
    Successfully installed listen-3.2.1
    Successfully installed dato_json_schema-0.20.8
    Successfully installed mime-types-data-3.2019.1009
    Successfully installed mime-types-3.3.1
    Successfully installed dato-0.7.10
    27 gems installed
    $ gem install jekyll
    Successfully installed colorator-1.1.0
    Building native extensions. This could take a while…
    Successfully installed http_parser.rb-0.6.0
    Building native extensions. This could take a while…
    Successfully installed eventmachine-1.2.7
    Successfully installed em-websocket-0.5.1
    Building native extensions. This could take a while…
    Successfully installed sassc-2.2.1
    Successfully installed jekyll-sass-converter-2.1.0
    Successfully installed jekyll-watch-2.2.1
    Successfully installed kramdown-2.1.0
    Successfully installed kramdown-parser-gfm-1.1.0
    Successfully installed liquid-4.0.3
    Successfully installed mercenary-0.3.6
    Successfully installed forwardable-extended-2.6.0
    Successfully installed pathutil-0.16.2
    Successfully installed rouge-3.17.0
    Successfully installed safe_yaml-1.0.5
    Successfully installed unicode-display_width-1.7.0
    Successfully installed terminal-table-1.8.0

Jekyll 4.0 comes with some major changes, notably:

  • Our link tag now comes with the relative_url filter incorporated into it.
    You should no longer prepend {{ site.baseurl }} to {% link foo.md %}
    For further details:
  • Our post_url tag now comes with the relative_url filter incorporated into it.
    You shouldn’t prepend {{ site.baseurl }} to {% post_url 2019-03-27-hello %}
    For further details:
  • Support for deprecated configuration options has been removed. We will no longer
    output a warning and gracefully assign their values to the newer counterparts
    internally.

Successfully installed jekyll-4.0.0
18 gems installed
$ bundle install --path vendor
[DEPRECATED] The --path flag is deprecated because it relies on being remembered across bundler invocations, which bundler will no longer do in future versions. Instead please use bundle config set path 'vendor', and stop using this flag
Fetching gem metadata from https://rubygems.org/
Resolving dependencies…
Using concurrent-ruby 1.1.6
Using i18n 1.8.2
Using minitest 5.14.0
Using thread_safe 0.3.6
Using tzinfo 1.2.7
Using zeitwerk 2.3.0
Using activesupport 6.0.2.2
Using public_suffix 4.0.3
Using addressable 2.7.0
Using bundler 2.1.4
Using cacert 0.5.0
Using colorator 1.1.0
Using dato_json_schema 0.20.8
Using dotenv 2.7.5
Using multipart-post 2.1.1
Using faraday 1.0.1
Using faraday_middleware 1.0.0
Using imgix 3.2.1
Using rb-fsevent 0.10.3
Using ffi 1.12.2
Using rb-inotify 0.10.1
Using listen 3.2.1
Using mime-types-data 3.2019.1009
Using mime-types 3.3.1
Using json 2.3.0
Using websocket 1.2.8
Using pusher-client 0.6.2
Using thor 1.0.1
Using parslet 1.8.2
Using toml 0.2.0
Using dato 0.7.10
Using eventmachine 1.2.7
Using http_parser.rb 0.6.0
Using em-websocket 0.5.1
Using forwardable-extended 2.6.0
Using sassc 2.2.1
Using jekyll-sass-converter 2.1.0
Using jekyll-watch 2.2.1
Using kramdown 2.1.0
Using kramdown-parser-gfm 1.1.0
Using liquid 4.0.3
Using mercenary 0.3.6
Using pathutil 0.16.2
Using rouge 3.17.0
Using safe_yaml 1.0.5
Using unicode-display_width 1.7.0
Using terminal-table 1.8.0
Using jekyll 4.0.0
Bundle complete! 3 Gemfile dependencies, 48 gems now installed.
Bundled gems are installed into ./vendor
$ bundle install
Using concurrent-ruby 1.1.6
Using i18n 1.8.2
Using minitest 5.14.0
Using thread_safe 0.3.6
Using tzinfo 1.2.7
Using zeitwerk 2.3.0
Using activesupport 6.0.2.2
Using public_suffix 4.0.3
Using addressable 2.7.0
Using bundler 2.1.4
Using cacert 0.5.0
Using colorator 1.1.0
Using dato_json_schema 0.20.8
Using dotenv 2.7.5
Using multipart-post 2.1.1
Using faraday 1.0.1
Using faraday_middleware 1.0.0
Using imgix 3.2.1
Using rb-fsevent 0.10.3
Using ffi 1.12.2
Using rb-inotify 0.10.1
Using listen 3.2.1
Using mime-types-data 3.2019.1009
Using mime-types 3.3.1
Using json 2.3.0
Using websocket 1.2.8
Using pusher-client 0.6.2
Using thor 1.0.1
Using parslet 1.8.2
Using toml 0.2.0
Using dato 0.7.10
Using eventmachine 1.2.7
Using http_parser.rb 0.6.0
Using em-websocket 0.5.1
Using forwardable-extended 2.6.0
Using sassc 2.2.1
Using jekyll-sass-converter 2.1.0
Using jekyll-watch 2.2.1
Using kramdown 2.1.0
Using kramdown-parser-gfm 1.1.0
Using liquid 4.0.3
Using mercenary 0.3.6
Using pathutil 0.16.2
Using rouge 3.17.0
Using safe_yaml 1.0.5
Using unicode-display_width 1.7.0
Using terminal-table 1.8.0
Using jekyll 4.0.0
Bundle complete! 3 Gemfile dependencies, 48 gems now installed.
Bundled gems are installed into ./vendor
$ bundle update
Fetching gem metadata from https://rubygems.org/
Resolving dependencies…
Using concurrent-ruby 1.1.6
Using i18n 1.8.2
Using minitest 5.14.0
Using thread_safe 0.3.6
Using tzinfo 1.2.7
Using zeitwerk 2.3.0
Using activesupport 6.0.2.2
Using public_suffix 4.0.3
Using addressable 2.7.0
Using bundler 2.1.4
Using cacert 0.5.0
Using colorator 1.1.0
Using dato_json_schema 0.20.8
Using dotenv 2.7.5
Using multipart-post 2.1.1
Using faraday 1.0.1
Using faraday_middleware 1.0.0
Using imgix 3.2.1
Using rb-fsevent 0.10.3
Using ffi 1.12.2
Using rb-inotify 0.10.1
Using listen 3.2.1
Using mime-types-data 3.2019.1009
Using mime-types 3.3.1
Using json 2.3.0
Using websocket 1.2.8
Using pusher-client 0.6.2
Using thor 1.0.1
Using parslet 1.8.2
Using toml 0.2.0
Using dato 0.7.10
Using eventmachine 1.2.7
Using http_parser.rb 0.6.0
Using em-websocket 0.5.1
Using forwardable-extended 2.6.0
Using sassc 2.2.1
Using jekyll-sass-converter 2.1.0
Using jekyll-watch 2.2.1
Using kramdown 2.1.0
Using kramdown-parser-gfm 1.1.0
Using liquid 4.0.3
Using mercenary 0.3.6
Using pathutil 0.16.2
Using rouge 3.17.0
Using safe_yaml 1.0.5
Using unicode-display_width 1.7.0
Using terminal-table 1.8.0
Using jekyll 4.0.0
Bundle updated!
$ echo ‘.env’ >> .gitignore
$ echo ‘DATO_API_TOKEN=*****************************’ >> .env
$ bundle exec dato dump
Fetching content from DatoCMS… ✓ Done!
$ bundle exec dato dump --preview
Fetching content from DatoCMS… ✓ Done!
$ bundle exec jekyll build -d public
Configuration file: none
Source: /builds/lohnsonok/datocms-project
Destination: /builds/lohnsonok/datocms-project/public
Incremental build: disabled. Enable with --incremental
Generating…
done in 0.014 seconds.
Auto-regeneration: disabled. Use --watch to enable.
Running after_script
00:07
Saving cache
00:30
Creating cache default…
vendor/: found 7749 matching files
No URL provided, cache will be not uploaded to shared cache server. Cache will be stored only locally.
Created cache
Uploading artifacts for successful job
00:09
Uploading artifacts…
public: found 7 matching files
Uploading artifacts to coordinator… ok id=2972 responseStatus=201 Created token=52GLVFuy
Job succeeded

And my gitlab-ci yamp file

# requiring the environment of Ruby 2.3.x

image: ruby:2.6

add cache to ‘vendor’ for speeding up builds

cache:
paths:
- vendor/
before_script:

  • bundle init
  • echo ‘gem “dato”’ >> Gemfile
  • echo ‘gem “jekyll”, “4.0.0”’ >> Gemfile
  • echo ‘gem “json”, “2.3.0”’ >> Gemfile
  • gem install bundler
  • gem install dato
  • gem install jekyll
  • bundle install --path vendor
  • bundle install
  • bundle update
    pages:
    stage: build
    script:

    first dump all the remote content as local files

    • echo ‘.env’ >> .gitignore
    • echo ‘DATO_API_TOKEN=*************************’ >> .env
    • bundle exec dato dump

    then generate the website

    • bundle exec dato dump --preview
      #- bundle exec dato jekyll build
    • bundle exec jekyll build -d public
      #- bundle exec jekyll build

    copy the /public folder to S3 bucket

    #- aws s3 cp ./ s3://$S3_BUCKET_NAME/ --recursive --exclude “" --include ".html”
    artifacts:
    paths:
    • public
      only:
    • master # the ‘deploy’ job will affect only the ‘master’ branch

hey @rintio welcome to Community!

Sorry but I cannot understand what’s your gitlab-ci.yml file. Could you attach that here?