Create link-check.yml

This commit is contained in:
Danny Salman 2022-09-03 19:48:14 -04:00 committed by GitHub
parent e6417c6f70
commit 1e8af6d36f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 35 additions and 0 deletions

35
.github/workflows/link-check.yml vendored Normal file
View File

@ -0,0 +1,35 @@
#
name: Links (Fail Fast)
on:
push:
pull_request:
jobs:
linkChecker:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
ref: linkchecker-py
- name: Set up Python 3.10
uses: actions/setup-python@v3
with:
python-version: "3.10"
- name: Install dependencies
run: |
python -m venv venv
. venv/bin/activate
python -m pip install --upgrade pip
python -m pip install linkchecker
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: Lint with LinkChecker
run: |
# linkcheckerrc is the configuration file for LinkChecker.
mkdir -p ~/.linkchecker
echo -e "[MarkdownCheck]\nfilename_re=*.md\n" > ~/.linkchecker/linkcheckerrc
# Check from broken (exteernal) links
. venv/bin/activate
linkchecker -v --check-extern ./docs/develop/getting-started.md