From 296ed986c2cac795e86adba5256f9a70d27ab09a Mon Sep 17 00:00:00 2001 From: Gabriel Arazas Date: Mon, 28 Nov 2022 09:40:05 +0800 Subject: [PATCH] Fix the Netlify build for the last time Apparently, it does not bode well for lockfiles with bundled versions of bundler. You have to install it explicitly with a Netlify-compatible version. --- Gemfile.lock | 13 ------------- netlify.toml | 7 ++++++- 2 files changed, 6 insertions(+), 14 deletions(-) delete mode 100644 Gemfile.lock diff --git a/Gemfile.lock b/Gemfile.lock deleted file mode 100644 index 42d33b7..0000000 --- a/Gemfile.lock +++ /dev/null @@ -1,13 +0,0 @@ -GEM - remote: https://rubygems.org/ - specs: - asciidoctor (2.0.18) - -PLATFORMS - x86_64-linux - -DEPENDENCIES - asciidoctor - -BUNDLED WITH - 2.3.26 diff --git a/netlify.toml b/netlify.toml index f183da7..e5c1e55 100644 --- a/netlify.toml +++ b/netlify.toml @@ -1,18 +1,23 @@ [build] publish = "public/" -command = "bundle && hugo --gc --minify" +command = "gem install bundler -v '~> 2.3' && bundle && hugo --gc --minify" [context.production.environment] +RUBY_VERSION = "3.0.4" HUGO_VERSION = "0.107.0" HUGO_ENV = "production" HUGO_ENABLEGITINFO = "true" HUGO_BASE_URL = "$DEPLOY_URL" [context.branch-deploy.environment] +RUBY_VERSION = "3.0.4" HUGO_VERSION = "0.107.0" +HUGO_ENV = "development" HUGO_BASE_URL = "$DEPLOY_PRIME_URL" [context.deploy-preview.environment] +RUBY_VERSION = "3.0.4" +HUGO_ENV = "development" HUGO_VERSION = "0.107.0" [context.deploy-preview]