From 1e31251c63bbee9c9e07774aaad7f702bb2506d8 Mon Sep 17 00:00:00 2001 From: David Young Date: Tue, 23 Aug 2022 23:10:53 +1200 Subject: [PATCH] Add separate daily check for broken links Signed-off-by: David Young --- .github/workflows/check-for-broken-links.yml | 28 +++++++++++++++++++ .../workflows/mkdocs-build-sanity-check.yml | 18 +----------- 2 files changed, 29 insertions(+), 17 deletions(-) create mode 100644 .github/workflows/check-for-broken-links.yml diff --git a/.github/workflows/check-for-broken-links.yml b/.github/workflows/check-for-broken-links.yml new file mode 100644 index 0000000..e4cd4a0 --- /dev/null +++ b/.github/workflows/check-for-broken-links.yml @@ -0,0 +1,28 @@ +name: Check for broken links + +on: + repository_dispatch: + workflow_dispatch: + schedule: + - cron: "00 18 * * *" + +jobs: + linkChecker: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + + - name: Link Checker + id: lychee + uses: lycheeverse/lychee-action@v1.5.1 + env: + GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} + + - name: Create Issue From File + if: steps.lychee.outputs.exit_code != 0 + uses: peter-evans/create-issue-from-file@v4 + with: + title: Link Checker Report + content-filepath: ./lychee/out.md + labels: report, automated issue + diff --git a/.github/workflows/mkdocs-build-sanity-check.yml b/.github/workflows/mkdocs-build-sanity-check.yml index d519357..7e87669 100644 --- a/.github/workflows/mkdocs-build-sanity-check.yml +++ b/.github/workflows/mkdocs-build-sanity-check.yml @@ -25,20 +25,4 @@ jobs: run: python3 -m pip install mkdocs-material - name: Test mkdocs builds - run: python3 -m mkdocs build - - - name: Link Checker - id: lychee - uses: lycheeverse/lychee-action@v1 - with: - args: --verbose --no-progress site/**/*.html - env: - GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} - - - name: Create Issue From File - if: steps.lychee.outputs.exit_code != 0 - uses: peter-evans/create-issue-from-file@v4 - with: - title: Link Checker Report - content-filepath: ./lychee/out.md - labels: report, automated issue \ No newline at end of file + run: python3 -m mkdocs build \ No newline at end of file