File tree Expand file tree Collapse file tree 1 file changed +55
-0
lines changed Expand file tree Collapse file tree 1 file changed +55
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Pull Request Checks
2+
3+ on :
4+ pull_request :
5+ branches :
6+ - main
7+
8+ jobs :
9+ lint-markdown :
10+ runs-on : ubuntu-latest
11+ steps :
12+ - name : Check out the code
13+ uses : actions/checkout@v3
14+
15+ - name : Install Node.js
16+ uses : actions/setup-node@v3
17+ with :
18+ node-version : ' 16'
19+
20+ - name : Install markdownlint
21+ run : |
22+ npm install -g markdownlint-cli
23+
24+ - name : Run markdown lint
25+ run : |
26+ markdownlint "**/*.md"
27+
28+ spell-check :
29+ runs-on : ubuntu-latest
30+ steps :
31+ - name : Check out the code
32+ uses : actions/checkout@v3
33+
34+ - name : Install cspell
35+ run : |
36+ npm install -g cspell
37+
38+ - name : Run spell check
39+ run : |
40+ cspell "**/*.md" || echo "Some spelling errors detected. Review the log for details."
41+
42+ validate-yaml-front-matter :
43+ runs-on : ubuntu-latest
44+ steps :
45+ - name : Check out the code
46+ uses : actions/checkout@v3
47+
48+ - name : Validate front matter
49+ run : |
50+ for file in _posts/*.md; do
51+ if ! grep -q "title:" "$file" || ! grep -q "date:" "$file"; then
52+ echo "Error: Missing required front matter fields in $file"
53+ exit 1
54+ fi
55+ done
You can’t perform that action at this time.
0 commit comments