Skip Jekyll-watch installation in deployment pipeline?

I’m wondering if it’s possible to skip jekyll-watch installation in my deployment pipeline as it’s the main bottleneck.

In my case the entire deployment takes almost 3m 30s and 95% of the time is wasted on jekyll-watch installation.

Is there a way to install it only on my local dev machine and totally skip it in my pipeline? Thanks in advance!

EDIT: I’m attaching the deployment logs here in case those could be useful, I’m using Cloudflare pages to be specific

2023-09-27T21:28:14.16788Z	Cloning repository...
2023-09-27T21:28:15.940739Z	From
2023-09-27T21:28:15.941405Z	 * branch            df59d1d5a982a5eb0838b634d919a10f3e8ea8b3 -> FETCH_HEAD
2023-09-27T21:28:16.060299Z	HEAD is now at df59d1d article: add network status api page for GSoC 2023
2023-09-27T21:28:16.195125Z	Success: Finished cloning repository files
2023-09-27T21:28:16.807039Z	Installing dependencies
2023-09-27T21:28:16.817027Z	Python version set to 2.7
2023-09-27T21:28:19.563752Z	v12.18.0 is already installed.
2023-09-27T21:28:20.70451Z	Now using node v12.18.0 (npm v6.14.4)
2023-09-27T21:28:20.884964Z	Started restoring cached build plugins
2023-09-27T21:28:20.896399Z	Finished restoring cached build plugins
2023-09-27T21:28:21.29066Z	Attempting ruby version 2.7.1, read from environment
2023-09-27T21:28:22.875878Z	Using /opt/buildhome/.rvm/gems/ruby-2.7.1
2023-09-27T21:28:23.447054Z	Using bundler version 2.3.6 from Gemfile.lock
2023-09-27T21:28:39.927051Z	Successfully installed bundler-2.3.6
2023-09-27T21:28:39.927506Z	1 gem installed
2023-09-27T21:28:39.961694Z	Using PHP version 5.6
2023-09-27T21:28:39.96223Z	Started restoring cached ruby gems
2023-09-27T21:28:39.974658Z	Finished restoring cached ruby gems
2023-09-27T21:28:39.975074Z	Installing gem bundle
2023-09-27T21:28:40.248089Z	[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 --local path '/opt/buildhome/cache/bundle'`, and stop using this flag
2023-09-27T21:28:40.370303Z	[DEPRECATED] The --binstubs option will be removed in favor of `bundle binstubs --all`
2023-09-27T21:28:40.512815Z	system temporary path is world-writable: /tmp
2023-09-27T21:28:40.513097Z	/tmp is world-writable: /tmp
2023-09-27T21:28:41.212521Z	Fetching gem metadata from temporary path is world-writable: /tmp
2023-09-27T21:28:42.768672Z	Resolving dependencies...
2023-09-27T21:28:42.844048Z	Using bundler 2.3.6
2023-09-27T21:28:42.844672Z	Fetching colorator 1.1.0
2023-09-27T21:28:42.844873Z	Fetching public_suffix 5.0.1
2023-09-27T21:28:42.844998Z	Fetching asciidoctor 2.0.20
2023-09-27T21:28:42.859664Z	Fetching concurrent-ruby 1.2.2
2023-09-27T21:28:42.979106Z	Installing colorator 1.1.0
2023-09-27T21:28:42.988746Z	Installing public_suffix 5.0.1
2023-09-27T21:28:43.020035Z	Installing concurrent-ruby 1.2.2
2023-09-27T21:28:43.02406Z	Installing asciidoctor 2.0.20
2023-09-27T21:28:43.068745Z	Fetching eventmachine 1.2.7
2023-09-27T21:28:43.276699Z	Installing eventmachine 1.2.7 with native extensions
2023-09-27T21:28:43.297642Z	Fetching http_parser.rb 0.8.0
2023-09-27T21:28:43.433231Z	Installing http_parser.rb 0.8.0 with native extensions
2023-09-27T21:28:43.691997Z	Fetching ffi 1.15.5
2023-09-27T21:28:43.977937Z	Fetching forwardable-extended 2.6.0
2023-09-27T21:28:44.056221Z	Installing ffi 1.15.5 with native extensions
2023-09-27T21:28:44.092752Z	Installing forwardable-extended 2.6.0
2023-09-27T21:28:45.820045Z	Fetching rb-fsevent 0.11.2
2023-09-27T21:28:45.883785Z	Installing rb-fsevent 0.11.2
2023-09-27T21:29:11.448361Z	Fetching rexml 3.2.5
2023-09-27T21:29:11.449132Z	Fetching liquid 4.0.4
2023-09-27T21:29:11.516918Z	Installing liquid 4.0.4
2023-09-27T21:29:11.590318Z	Installing rexml 3.2.5
2023-09-27T21:29:12.737745Z	Fetching mercenary 0.4.0
2023-09-27T21:29:12.740632Z	Fetching rouge 3.30.0
2023-09-27T21:29:12.741979Z	Fetching safe_yaml 1.0.5
2023-09-27T21:29:12.753654Z	Fetching unicode-display_width 1.8.0
2023-09-27T21:29:12.808162Z	Installing unicode-display_width 1.8.0
2023-09-27T21:29:12.815227Z	Installing safe_yaml 1.0.5
2023-09-27T21:29:12.818037Z	Installing mercenary 0.4.0
2023-09-27T21:29:12.897877Z	Fetching webrick 1.8.1
2023-09-27T21:29:12.957884Z	Installing rouge 3.30.0
2023-09-27T21:29:12.994631Z	Installing webrick 1.8.1
2023-09-27T21:29:13.02875Z	Fetching addressable 2.8.4
2023-09-27T21:29:13.132291Z	Installing addressable 2.8.4
2023-09-27T21:29:13.136317Z	Fetching i18n 1.14.0
2023-09-27T21:29:13.244887Z	Installing i18n 1.14.0
2023-09-27T21:29:13.293606Z	Fetching pathutil 0.16.2
2023-09-27T21:29:13.370787Z	Fetching sassc 2.4.0
2023-09-27T21:29:13.426739Z	Installing pathutil 0.16.2
2023-09-27T21:29:13.499648Z	Fetching rb-inotify 0.10.1
2023-09-27T21:29:13.564144Z	Fetching kramdown 2.4.0
2023-09-27T21:29:13.57609Z	Installing sassc 2.4.0 with native extensions
2023-09-27T21:29:13.594248Z	Installing rb-inotify 0.10.1
2023-09-27T21:29:13.665326Z	Installing kramdown 2.4.0
2023-09-27T21:29:13.708875Z	Fetching em-websocket 0.5.3
2023-09-27T21:29:13.788882Z	Installing em-websocket 0.5.3
2023-09-27T21:29:14.133056Z	Fetching terminal-table 2.0.0
2023-09-27T21:29:14.223955Z	Installing terminal-table 2.0.0
2023-09-27T21:29:14.359146Z	Fetching listen 3.8.0
2023-09-27T21:29:14.459392Z	Installing listen 3.8.0
2023-09-27T21:29:14.743521Z	Fetching jekyll-watch 2.2.1
2023-09-27T21:29:14.827757Z	Installing jekyll-watch 2.2.1
<================================================ HERE
2023-09-27T21:32:03.080718Z	Fetching kramdown-parser-gfm 1.1.0
2023-09-27T21:32:03.085286Z	Fetching jekyll-sass-converter 2.2.0
2023-09-27T21:32:03.136457Z	Installing kramdown-parser-gfm 1.1.0
2023-09-27T21:32:03.143503Z	Installing jekyll-sass-converter 2.2.0
2023-09-27T21:32:03.220402Z	Fetching jekyll 4.2.2
2023-09-27T21:32:03.283469Z	Installing jekyll 4.2.2
2023-09-27T21:32:03.447894Z	Fetching jekyll-feed 0.17.0
2023-09-27T21:32:03.449767Z	Fetching jekyll-asciidoc 3.0.0
2023-09-27T21:32:03.450074Z	Fetching jekyll-redirect-from 0.16.0
2023-09-27T21:32:03.501025Z	Installing jekyll-redirect-from 0.16.0
2023-09-27T21:32:03.50824Z	Installing jekyll-feed 0.17.0
2023-09-27T21:32:03.556089Z	Installing jekyll-asciidoc 3.0.0
2023-09-27T21:32:03.655764Z	Bundle complete! 5 Gemfile dependencies, 33 gems now installed.
2023-09-27T21:32:03.656095Z	Bundled gems are installed into `/opt/buildhome/cache/bundle`
2023-09-27T21:32:03.702036Z	Gem bundle installed
2023-09-27T21:32:03.856999Z	5.2.5 is already installed.
2023-09-27T21:32:03.872215Z	Using Swift version 5.2.5
2023-09-27T21:32:03.872476Z	Installing Hugo 0.54.0
2023-09-27T21:32:05.096127Z	Hugo Static Site Generator v0.54.0-B1A82C61A/extended linux/amd64 BuildDate: 2019-02-01T10:04:38Z
2023-09-27T21:32:05.099885Z	Started restoring cached go cache
2023-09-27T21:32:05.112305Z	Finished restoring cached go cache
2023-09-27T21:32:05.195283Z	go version go1.14.4 linux/amd64
2023-09-27T21:32:05.20792Z	go version go1.14.4 linux/amd64
2023-09-27T21:32:05.211318Z	Installing missing commands
2023-09-27T21:32:05.211683Z	Verify run directory
2023-09-27T21:32:05.211829Z	Executing user command: jekyll build
2023-09-27T21:32:06.031525Z	Configuration file: /opt/buildhome/repo/_config.yml
2023-09-27T21:32:06.104478Z	            Source: /opt/buildhome/repo
2023-09-27T21:32:06.104771Z	       Destination: /opt/buildhome/repo/_site
2023-09-27T21:32:06.104963Z	 Incremental build: disabled. Enable with --incremental
2023-09-27T21:32:06.105095Z	      Generating... 
2023-09-27T21:32:06.181958Z	       Jekyll Feed: Generating feed for posts
2023-09-27T21:32:06.226729Z	asciidoctor: WARNING: SVG is outside of jail; recovering automatically
2023-09-27T21:32:06.598823Z	asciidoctor: WARNING: 2023-03-16-notes-on-python.adoc: line 18: section title out of sequence: expected level 1, got level 2
2023-09-27T21:32:06.599142Z	asciidoctor: WARNING: 2023-03-16-notes-on-python.adoc: line 26: section title out of sequence: expected level 1, got level 2
2023-09-27T21:32:06.599309Z	asciidoctor: WARNING: 2023-03-16-notes-on-python.adoc: line 33: section title out of sequence: expected level 1, got level 2
2023-09-27T21:32:06.599452Z	asciidoctor: WARNING: 2023-03-16-notes-on-python.adoc: line 53: section title out of sequence: expected level 1, got level 2
2023-09-27T21:32:06.599574Z	asciidoctor: WARNING: 2023-03-16-notes-on-python.adoc: line 61: section title out of sequence: expected level 1, got level 2
2023-09-27T21:32:06.599711Z	asciidoctor: WARNING: 2023-03-16-notes-on-python.adoc: line 70: section title out of sequence: expected level 1, got level 2
2023-09-27T21:32:06.599834Z	asciidoctor: WARNING: 2023-03-16-notes-on-python.adoc: line 79: section title out of sequence: expected level 1, got level 2
2023-09-27T21:32:06.599958Z	asciidoctor: WARNING: 2023-03-16-notes-on-python.adoc: line 92: section title out of sequence: expected level 1, got level 2
2023-09-27T21:32:06.788546Z	                    done in 0.684 seconds.
2023-09-27T21:32:06.788848Z	 Auto-regeneration: disabled. Use --watch to enable.
2023-09-27T21:32:06.803387Z	Finished
2023-09-27T21:32:06.804045Z	Note: No functions dir at /functions found. Skipping.
2023-09-27T21:32:06.804228Z	Validating asset output directory
2023-09-27T21:32:07.721827Z	Deploying your site to Cloudflare's global network...
2023-09-27T21:32:10.093913Z	Uploading... (51/54)
2023-09-27T21:32:10.658328Z	Uploading... (52/54)
2023-09-27T21:32:10.719879Z	Uploading... (53/54)
2023-09-27T21:32:10.750235Z	Uploading... (54/54)
2023-09-27T21:32:10.750505Z	✨ Success! Uploaded 3 files (51 already uploaded) (1.21 sec)
2023-09-27T21:32:11.120787Z	✨ Upload complete!
2023-09-27T21:32:13.090761Z	Success: Assets published!
2023-09-27T21:32:13.891646Z	Success: Your site was deployed!

try removing it from your gemfile.lock? it is before the install jekyll line, not sure if it will just do it again when it gets there.

I assume you are using docker as part of this? could you find a docker container that already has jekyll installed?

I’ve tried to remove the dep from the Gemfile.lock but it still installs it, it seems like Jekyll itself has it as a dep? I’m using Cloudflare Pages with the Jekyll configuration so I don’t have control over the deployment details :confused:

yes, I am sure it is a jekyll dep so I guess it is installing it anyways.

I’m not familiar with CF so, maybe ask them? I would guess you could make your own custom build script with them and then you’d probably be able to use a container that was all setup already.

At any rate 3-4 minutes for a deploy isn’t all that bad for the things I work on, I’d guess you’d be ok with it if it wasn’t for the log that seems to show it is all one thing that isn’t even needed!

Not a direct solution, but you could look into caching the installed Gems. From the docs, it looks like CF has some caching support, but maybe not explicitly for Ruby. Possibly you could install Gems into .cache by setting the GEM_HOME environment variable, but that’s just a guess. Cache docs: