File tree Expand file tree Collapse file tree 2 files changed +105
-0
lines changed Expand file tree Collapse file tree 2 files changed +105
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : Markdown Lint Check
2
+
3
+ on :
4
+ pull_request :
5
+ paths :
6
+ - ' **/*.md'
7
+ push :
8
+ branches :
9
+ - main
10
+
11
+ jobs :
12
+ markdown-lint :
13
+ runs-on : ubuntu-latest
14
+ steps :
15
+ - name : Checkout Code
16
+ uses : actions/checkout@v4
17
+
18
+ - name : Check if Markdown Files Changed
19
+ id : check_changes
20
+ run : |
21
+ if git diff --name-only ${{ github.event.before }} ${{ github.sha }} | grep -E '\.md$'; then
22
+ echo "changed=true" >> $GITHUB_OUTPUT
23
+ else
24
+ echo "changed=false" >> $GITHUB_OUTPUT
25
+ fi
26
+
27
+ - name : Install Markdownlint
28
+ if : steps.check_changes.outputs.changed == 'true'
29
+ run : |
30
+ sudo apt-get update
31
+ sudo apt-get install -y markdownlint-cli
32
+
33
+ - name : Run Markdownlint Check
34
+ if : steps.check_changes.outputs.changed == 'true'
35
+ run : |
36
+ markdownlint '**/*.md' --config .markdownlint.json
Original file line number Diff line number Diff line change
1
+ {
2
+ "code-block-style" : {
3
+ "style" : " fenced"
4
+ },
5
+ "code-fence-style" : {
6
+ "style" : " backtick"
7
+ },
8
+ "emphasis-style" : {
9
+ "style" : " asterisk"
10
+ },
11
+ "extended-ascii" : {
12
+ "ascii-only" : true
13
+ },
14
+ "fenced-code-language" : {
15
+ "allowed_languages" : [
16
+ " bash" ,
17
+ " go" ,
18
+ " html" ,
19
+ " javascript" ,
20
+ " json" ,
21
+ " markdown" ,
22
+ " text"
23
+ ],
24
+ "language_only" : true
25
+ },
26
+ "heading-style" : {
27
+ "style" : " atx"
28
+ },
29
+ "hr-style" : {
30
+ "style" : " ---"
31
+ },
32
+ "line-length" : {
33
+ "strict" : true ,
34
+ "code_blocks" : false
35
+ },
36
+ "link-image-style" : {
37
+ "collapsed" : false ,
38
+ "shortcut" : false ,
39
+ "url_inline" : false
40
+ },
41
+ "no-duplicate-heading" : {
42
+ "siblings_only" : true
43
+ },
44
+ "ol-prefix" : {
45
+ "style" : " ordered"
46
+ },
47
+ "proper-names" : {
48
+ "code_blocks" : false ,
49
+ "names" : [
50
+ " Cake.Markdownlint" ,
51
+ " CommonMark" ,
52
+ " JavaScript" ,
53
+ " Markdown" ,
54
+ " markdown-it" ,
55
+ " markdownlint" ,
56
+ " Node.js" ,
57
+ " Go"
58
+ ]
59
+ },
60
+ "reference-links-images" : {
61
+ "shortcut_syntax" : true
62
+ },
63
+ "strong-style" : {
64
+ "style" : " asterisk"
65
+ },
66
+ "ul-style" : {
67
+ "style" : " dash"
68
+ }
69
+ }
You can’t perform that action at this time.
0 commit comments