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.
This commit is contained in:
Issy Long 2023-08-31 15:25:59 +01:00
parent 59cc141524
commit c18980d20d
No known key found for this signature in database
GPG Key ID: 8247C390DADC67D4

View File

@ -32,7 +32,7 @@ jobs:
- name: Install Ruby - name: Install Ruby
uses: ruby/setup-ruby@v1 uses: ruby/setup-ruby@v1
with: with:
ruby-version: "2.7" ruby-version: "3.1"
bundler-cache: true bundler-cache: true
working-directory: ${{ steps.set-up-homebrew.outputs.repository-path }}/docs 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 working-directory: ${{ steps.set-up-homebrew.outputs.repository-path }}/docs
run: bundle exec rake lint 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 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: rubydoc:
if: github.repository == 'Homebrew/brew' if: github.repository == 'Homebrew/brew'