mirror of
https://github.com/Homebrew/brew.git
synced 2025-07-14 16:09:03 +08:00
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:
parent
c6c0be6f7f
commit
faedd41dfb
5
.github/workflows/docs.yml
vendored
5
.github/workflows/docs.yml
vendored
@ -63,6 +63,11 @@ jobs:
|
|||||||
- name: Check code blocks conform to our Ruby style guide
|
- name: Check code blocks conform to our Ruby style guide
|
||||||
run: brew style docs
|
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
|
- name: Build the site and check for broken links
|
||||||
working-directory: docs
|
working-directory: docs
|
||||||
run: bundle exec rake test
|
run: bundle exec rake test
|
||||||
|
@ -17,26 +17,27 @@ task test: :build do
|
|||||||
require "html-proofer"
|
require "html-proofer"
|
||||||
HTMLProofer.check_directory(
|
HTMLProofer.check_directory(
|
||||||
"./_site",
|
"./_site",
|
||||||
parallel: { in_threads: 4 },
|
parallel: { in_threads: 4 },
|
||||||
favicon: true,
|
favicon: true,
|
||||||
ignore_status_codes: [0, 403],
|
ignore_status_codes: [0, 403],
|
||||||
check_favicon: true,
|
check_favicon: true,
|
||||||
check_opengraph: true,
|
check_opengraph: true,
|
||||||
check_html: true,
|
check_html: true,
|
||||||
check_img_http: true,
|
check_img_http: true,
|
||||||
enforce_https: true,
|
enforce_https: true,
|
||||||
ignore_files: [
|
ignore_files: [
|
||||||
%r{Kickstarter-Supporters},
|
/Kickstarter-Supporters/,
|
||||||
],
|
],
|
||||||
ignore_urls: [
|
ignore_urls: [
|
||||||
|
"/",
|
||||||
%r{https://formulae.brew.sh"},
|
%r{https://formulae.brew.sh"},
|
||||||
%r{https://github.com/},
|
%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: {
|
cache: {
|
||||||
timeframe: {
|
timeframe: {
|
||||||
external: "1h"
|
external: "1h",
|
||||||
}
|
},
|
||||||
}
|
},
|
||||||
).run
|
).run
|
||||||
end
|
end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user