Skip to content
This repository has been archived by the owner on Nov 1, 2022. It is now read-only.

Commit

Permalink
better link checking, break out of #2948
Browse files Browse the repository at this point in the history
	- .github/workflows/markdown-link-check-config.json has some
	  patterns we exlude while checking the markdown files in the
	  top-level directories (company websites on README.md and
	  billions of GH issues in CHANGELOG.md in particular)
	- once gaurav-nelson/github-action-markdown-link-check#26
	  is merged, we can move back to the official GH Action
  • Loading branch information
Daniel Holbach committed Apr 3, 2020
1 parent f114d6d commit ab279ad
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 2 deletions.
18 changes: 16 additions & 2 deletions .github/workflows/docs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,19 @@ jobs:
python-version: [3.8]
steps:
- uses: actions/checkout@v2
# Using markdown-link-check to check markdown docs
- name: Link Checker (for top-level markdown docs)
uses: dholbach/github-action-markdown-link-check@add-max-depth
with:
use-verbose-mode: 'yes'
config-file: '.github/workflows/markdown-link-check-config.json'
folder-path: ./
max-depth: 1
- name: Link Checker (for ./internal markdown docs)
uses: dholbach/github-action-markdown-link-check@add-max-depth
with:
use-verbose-mode: 'yes'
folder-path: ./internal/docs/
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
with:
Expand All @@ -24,10 +37,11 @@ jobs:
pip install -r docs/requirements.txt
- name: Build docs for link check
run: mkdocs build
- name: Link Checker
# Using liche action to check generated HTML site
- name: Link Checker (generated site)
id: lc
uses: peter-evans/link-checker@v1
with:
args: -r -d site/ -v site/index.html
args: -v -d ./site -r ./site
- name: Fail if there were link errors
run: exit ${{ steps.lc.outputs.exit_code }}
9 changes: 9 additions & 0 deletions .github/workflows/markdown-link-check-config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"ignorePatterns": [
{
"githubIssuePattern": "^https://github.com/\\S+/\\S+/(issues|pull)/[0-9]+",
"mailtoPattern": "^mailto:",
"companySitesWith403sPattern": "^https://www.(blablacar|canva|underarmour).com"
}
]
}

0 comments on commit ab279ad

Please sign in to comment.