-
-
Notifications
You must be signed in to change notification settings - Fork 9
58 lines (53 loc) · 1.5 KB
/
validate_markdown.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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
---
name: Validate Markdown
# yamllint disable-line rule:truthy
on:
pull_request:
paths:
- '**/*.md'
push:
paths:
- '**/*.md'
workflow_dispatch:
jobs:
markdown-lint:
name: Markdown Lint
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@main
with:
fetch-depth: '0'
# https://github.com/marketplace/actions/markdownlint-cli2-action
- name: Identify changed files
uses: tj-actions/changed-files@v41
id: changed-files
with:
files: '**/*.md'
separator: ","
# https://github.com/marketplace/actions/markdownlint-cli2-action
- name: Markdown Lint
uses: DavidAnson/markdownlint-cli2-action@v14
if: steps.changed-files.outputs.any_changed == 'true'
with:
globs: ${{ steps.changed-files.outputs.all_changed_files }}
separator: ","
config: '.rules/.markdownlint.jsonc'
fix: true
markdown-links:
name: Check links
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@main
with:
fetch-depth: '0'
# https://github.com/gaurav-nelson/github-action-markdown-link-check
- name: Markdown links
uses: gaurav-nelson/github-action-markdown-link-check@v1
with:
# yamllint disable-line rule:truthy
check-modified-files-only: yes
config-file: '.rules/mlc_config.json'
base-branch: 'main'
...