diff --git a/.github/workflows/check-links.yml b/.github/workflows/check-links.yml index 7d8caaa..1938d24 100644 --- a/.github/workflows/check-links.yml +++ b/.github/workflows/check-links.yml @@ -5,13 +5,24 @@ on: pull_request: paths: - "source/**" - jobs: - check_links: + linkChecker: runs-on: ubuntu-latest - container: - image: ministryofjustice/tech-docs-github-pages-publisher:v3.0.1 steps: - - uses: actions/checkout@v4 - - name: htmlproofer - run: /scripts/deploy.sh no-repository-changes + - uses: actions/checkout@v4 + + - name: Link Checker + id: lychee + uses: lycheeverse/lychee-action@v1.8.0 + with: + args: --verbose --exclude-mail --no-progress './**/*.md' './**/*.html' './**/*.erb' --accept 403,200,429 + env: + GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} + + - name: Create Issue From File + if: env.lychee_exit_code != 0 + uses: peter-evans/create-issue-from-file@v4 + with: + title: Link Checker Report + content-filepath: ./lychee/out.md + labels: documentation