From 5b93592242235fec4c5a9e1bc2a57cfd33a77e15 Mon Sep 17 00:00:00 2001 From: Mo Li <2568818204@qq.com> Date: Tue, 10 Sep 2024 10:20:40 +0800 Subject: [PATCH] [Fix] Fix link-check workflow by adjusting line breaks in URL ignore patterns (#1507) * update link-check * update link-check * update link-check --- .github/workflows/link-check.yml | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/.github/workflows/link-check.yml b/.github/workflows/link-check.yml index e41b1bc4..c6f3bdd2 100644 --- a/.github/workflows/link-check.yml +++ b/.github/workflows/link-check.yml @@ -5,17 +5,22 @@ on: # check links at 01:30 a.m. every day - cron: '30 1 * * *' + workflow_dispatch: # allow manual trigger + jobs: link-check: runs-on: ubuntu-latest steps: # - uses: actions/checkout@v3 - - name: linkchecker + - name: Install linkchecker run: | pip install linkchecker - linkchecker https://opencompass.readthedocs.io/ --no-robots -t 30 --no-warnings | - --ignore-url https://opencompass\.readthedocs\.io/.*/static/images/opencompass_logo\.svg | - --ignore-url https://opencompass\.readthedocs\.io/.*/_static/images/icon-menu-dots\.svg | - --ignore-url https://opencompass\.readthedocs\.io/policy | - --ignore-url https://opencompass\.readthedocs\.io/(en|zh_CN)/[0-9a-f]{40}/.* + + - name: Run linkchecker + run: | + linkchecker https://opencompass.readthedocs.io/ --no-robots -t 30 --no-warnings \ + --ignore-url "https://opencompass.readthedocs.io/.*/static/images/opencompass_logo.svg" \ + --ignore-url "https://opencompass.readthedocs.io/.*/_static/images/icon-menu-dots.svg" \ + --ignore-url "https://opencompass.readthedocs.io/policy" \ + --ignore-url "https://opencompass.readthedocs.io/(en|zh_CN)/[0-9a-f]{40}/.*"