From c18980d20dc9d3c3b29abb472eda1a5a3eb155da Mon Sep 17 00:00:00 2001 From: Issy Long Date: Thu, 31 Aug 2023 15:25:59 +0100 Subject: [PATCH] Run the docs site's broken link checker in the docs linting CI job - We had `rake test` as a task, but we never actually ran it in CI or anywhere before building the site. - The `html-proofer` gem [only supports Ruby 3.1](https://github.com/gjtorikian/html-proofer/blob/main/html-proofer.gemspec#L20), so I bumped the linting job to use Ruby 3.1 across the board. - This will make things slower (or maybe it's taking ages because of my dodgy hotel internet connection), maybe we should only run it on a schedule as a separate job? - Fixes https://github.com/Homebrew/brew/issues/ 15908. --- .github/workflows/docs.yml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index f666307ba6..9fc10f3883 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -32,7 +32,7 @@ jobs: - name: Install Ruby uses: ruby/setup-ruby@v1 with: - ruby-version: "2.7" + ruby-version: "3.1" bundler-cache: true working-directory: ${{ steps.set-up-homebrew.outputs.repository-path }}/docs @@ -40,9 +40,11 @@ jobs: working-directory: ${{ steps.set-up-homebrew.outputs.repository-path }}/docs run: bundle exec rake lint - - name: Build docs site + - name: Check for broken links, then build docs site working-directory: ${{ steps.set-up-homebrew.outputs.repository-path }}/docs - run: bundle exec rake build + run: | + bundle exec rake test + bundle exec rake build rubydoc: if: github.repository == 'Homebrew/brew'