From 24b210a3fdd089771f7344d7bb8813fd814fba52 Mon Sep 17 00:00:00 2001 From: Jeremy Yallop Date: Thu, 9 Nov 2023 17:09:35 +0000 Subject: [PATCH] Switch to lychee-action for checking links https://github.com/lycheeverse/lychee-action --- .github/workflows/checklinks.yml | 31 +++++++++++++++---------------- .lycheeignore | 2 ++ 2 files changed, 17 insertions(+), 16 deletions(-) create mode 100644 .lycheeignore diff --git a/.github/workflows/checklinks.yml b/.github/workflows/checklinks.yml index 679dc9d..e75da2b 100644 --- a/.github/workflows/checklinks.yml +++ b/.github/workflows/checklinks.yml @@ -1,25 +1,24 @@ -name: checklinks +name: Links (Fail Fast) on: push: - branches: - - master pull_request: - branches: - - master jobs: - build: + linkChecker: runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - uses: actions/setup-python@v2 + - uses: actions/checkout@v3 + + - name: Restore lychee cache + uses: actions/cache@v3 + with: + path: .lycheecache + key: cache-lychee-${{ github.sha }} + restore-keys: cache-lychee- + + - name: Run lychee + uses: lycheeverse/lychee-action@v1.8.0 with: - python-version: '3.8' - - name: install URL-checking script - run: | - pip install requests markdown beautifulsoup4 - wget https://raw.githubusercontent.com/yallop/check-markdown-urls/master/src/check_markdown_urls.py - - name: check the URLs - run: python check_markdown_urls.py README.md + fail: true + args: "--cache --max-redirects 10 --max-cache-age 1d ." diff --git a/.lycheeignore b/.lycheeignore new file mode 100644 index 0000000..490b265 --- /dev/null +++ b/.lycheeignore @@ -0,0 +1,2 @@ +https://dl.acm.org/doi/pdf/.* +https://www.cs.uoregon.edu/research/summerschool/.*