docs: more workflow improvements.

- Add a special step to handle formulae.brew.sh API samples generation.
- Ignore the root URL: it always works and often is a false-positive
  failure.

While we're here:
- Autofix some RuboCop offenses in the Rakefile.
This commit is contained in:
Mike McQuaid 2024-06-11 13:53:16 +01:00
parent c6c0be6f7f
commit faedd41dfb
No known key found for this signature in database
2 changed files with 21 additions and 15 deletions

View File

@ -63,6 +63,11 @@ jobs:
- name: Check code blocks conform to our Ruby style guide
run: brew style docs
- name: Generate formulae.brew.sh API samples
if: github.repository == 'Homebrew/formulae.brew.sh'
working-directory: docs
run: ../script/generate-api-samples.rb
- name: Build the site and check for broken links
working-directory: docs
run: bundle exec rake test

View File

@ -26,17 +26,18 @@ task test: :build do
check_img_http: true,
enforce_https: true,
ignore_files: [
%r{Kickstarter-Supporters},
/Kickstarter-Supporters/,
],
ignore_urls: [
"/",
%r{https://formulae.brew.sh"},
%r{https://github.com/},
'https://legacy.python.org/dev/peps/pep-0453/#recommendations-for-downstream-distributors',
"https://legacy.python.org/dev/peps/pep-0453/#recommendations-for-downstream-distributors",
],
cache: {
timeframe: {
external: "1h"
}
}
external: "1h",
},
},
).run
end