Skip to content

Commit 9c2879d

Browse files
committed
feat: add GH action markdown linting
* specification file * schema readme files
1 parent 155301e commit 9c2879d

File tree

5 files changed

+309
-9
lines changed

5 files changed

+309
-9
lines changed
Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
name: validate-markdown
22

3-
# Author: @MikeRalphson
4-
# Issue: https://github.com/OAI/OpenAPI-Specification/issues/2130
3+
# Author: @ralfhandl based on work of @MikeRalphson
54

65
#
7-
# This workflow validates files in the versions directory matching 1.*.md
6+
# This workflow validates markdown files in the `versions` directory matching *.md
87
#
98

109
# run this on push to any branch and creation of pull-requests
@@ -16,9 +15,16 @@ jobs:
1615
runs-on: ubuntu-latest
1716

1817
steps:
19-
- uses: actions/checkout@v2 # checkout repo content
20-
- uses: actions/setup-node@v1 # setup Node.js
18+
- uses: actions/checkout@v4 # checkout repo content
2119
with:
22-
node-version: '18.x'
20+
fetch-depth: 0
21+
# - name: use the javascript environment from main
22+
# run: |
23+
# git checkout remotes/origin/main -- package.json package-lock.json .markdownlint.yaml
24+
- uses: actions/setup-node@v4 # setup Node.js
25+
with:
26+
node-version: '20.x'
2327
- name: Validate markdown
24-
run: npx mdv versions/1.*.md
28+
run: npx --yes mdv ./versions/[1-2].*.md
29+
- name: Lint markdown
30+
run: npx --yes markdownlint-cli --config .markdownlint.yaml versions/1.0.[^0].md versions/1.[1-9].*.md versions/2.*.md

.markdownlint.yaml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# Unordered list indentation
2+
MD007:
3+
indent: 2
4+
5+
MD012: false # allow blank lines
6+
7+
MD013:
8+
line_length: 800
9+
tables: false
10+
11+
MD024: false # duplicate headings
12+
MD033: false # inline HTML

package-lock.json

Lines changed: 262 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)