From 1e8af6d36f9f38e46c881f122628084ffdfb04fe Mon Sep 17 00:00:00 2001 From: Danny Salman Date: Sat, 3 Sep 2022 19:48:14 -0400 Subject: [PATCH] Create link-check.yml --- .github/workflows/link-check.yml | 35 ++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 .github/workflows/link-check.yml diff --git a/.github/workflows/link-check.yml b/.github/workflows/link-check.yml new file mode 100644 index 0000000..4772668 --- /dev/null +++ b/.github/workflows/link-check.yml @@ -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