From 3392226a100dbed83639c79d88e9c540e5277855 Mon Sep 17 00:00:00 2001 From: Mike McQuaid Date: Thu, 23 May 2024 16:29:14 +0100 Subject: [PATCH] Include more Ruby metadata files - include `.ruby-version` and in the project root (and unignore in `.gitignore`) to improve editor support which expects these files - use the `.ruby-version` in `docs/Gemfile` to use a consistent Ruby version here - remove hardcoded Ruby versions from `workflows/docs` in favour of using the `.ruby-version` file instead - use more consistent configuration in `workflows/docs` to match `workflows/tests` --- .github/workflows/docs.yml | 10 ++++++++-- .gitignore | 5 +++-- .ruby-version | 1 + docs/.ruby-version | 1 + docs/Gemfile | 2 ++ 5 files changed, 15 insertions(+), 4 deletions(-) create mode 100644 .ruby-version create mode 100644 docs/.ruby-version diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 3b39f901a0..437b6e6ea4 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -9,6 +9,13 @@ on: permissions: contents: read +env: + HOMEBREW_DEVELOPER: 1 + HOMEBREW_NO_AUTO_UPDATE: 1 + HOMEBREW_NO_ENV_HINTS: 1 + HOMEBREW_BOOTSNAP: 1 + HOMEBREW_NO_INSTALL_CLEANUP: 1 + jobs: linting: if: github.repository == 'Homebrew/brew' @@ -45,7 +52,6 @@ jobs: - name: Install Ruby uses: ruby/setup-ruby@943103cae7d3f1bb1e4951d5fcc7928b40e4b742 # v1.177.1 with: - ruby-version: "3.1" bundler-cache: true working-directory: ${{ steps.set-up-homebrew.outputs.repository-path }}/docs @@ -85,8 +91,8 @@ jobs: - name: Install Ruby uses: ruby/setup-ruby@943103cae7d3f1bb1e4951d5fcc7928b40e4b742 # v1.177.1 with: - ruby-version: "3.1" bundler-cache: true + working-directory: rubydoc - name: Process rubydoc comments working-directory: ${{ steps.set-up-homebrew.outputs.repository-path }}/Library/Homebrew diff --git a/.gitignore b/.gitignore index 93132f8ef0..f34c6de65f 100644 --- a/.gitignore +++ b/.gitignore @@ -173,9 +173,10 @@ !/.editorconfig !/.gitignore !/.irb_config -!/.yardopts -!/.vale.ini +!/.ruby-version !/.shellcheckrc +!/.vale.ini +!/.yardopts !/CHANGELOG.md !/CONTRIBUTING.md !/Dockerfile diff --git a/.ruby-version b/.ruby-version new file mode 100644 index 0000000000..bea438e9ad --- /dev/null +++ b/.ruby-version @@ -0,0 +1 @@ +3.3.1 diff --git a/docs/.ruby-version b/docs/.ruby-version new file mode 100644 index 0000000000..bea438e9ad --- /dev/null +++ b/docs/.ruby-version @@ -0,0 +1 @@ +3.3.1 diff --git a/docs/Gemfile b/docs/Gemfile index b23583ab53..f45f45b95f 100644 --- a/docs/Gemfile +++ b/docs/Gemfile @@ -1,5 +1,7 @@ source "https://rubygems.org" +ruby file: ".ruby-version" + gem "github-pages", group: :jekyll_plugins group :test do