-
Notifications
You must be signed in to change notification settings - Fork 8
38 lines (34 loc) · 1.12 KB
/
check-broken-links.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
name: Check for broken links
on:
workflow_dispatch: # Triggered manually. In GitHub repository, go to Actions tab > click 'Check for broken links' in sidebar > click 'Run workflow' at the top of the page.
pull_request:
branches:
- main
jobs:
link-checker:
runs-on: ubuntu-latest
permissions:
issues: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
submodules: true
- name: Check links
id: check-links
uses: lycheeverse/lychee-action@v2
with:
fail: false
output: ./check-links-output/report.md
args: >
--exclude-path ./docs/data/archive
--exclude-path ./docs/data/version-history
--exclude-path ./docs/tech-alerts
./**/*.md ./**/*.rst ./**/*.ipynb ./**/*.yaml ./**/*.yml
- name: Create issue
if: steps.check-links.outputs.exit_code != 0
uses: peter-evans/create-issue-from-file@v5
with:
title: Fix broken links
content-filepath: ./check-links-output/report.md
labels: link-checker