-
-
Notifications
You must be signed in to change notification settings - Fork 0
32 lines (26 loc) · 974 Bytes
/
broken-links.yml
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
name: Check for broken links
on: [ push, pull_request ]
jobs:
broken-link-check:
runs-on: ubuntu-latest
name: Check for broken links in README.md
steps:
- name: Checkout repository
uses: actions/checkout@v2
with:
# Disabling shallow clone for improving relevancy of SonarQube reporting
fetch-depth: 0
- name: Prepare git
run: |
git config --global core.autocrlf false
git config --global core.ignorecase false
git config --global help.autocorrect 1
git config --global core.fileMode false
- name: Read Node version from .nvmrc
run: echo "##[set-output name=NVMRC;]$(cat .nvmrc)"
id: nvm
- uses: actions/setup-node@v2.1.4
with:
node-version: ${{ steps.nvm.outputs.NVMRC }}
- run: npm install -g markdown-link-check
- run: find . -name \*.md -exec markdown-link-check -c .broken-link-config.json {} \;