-
Notifications
You must be signed in to change notification settings - Fork 692
40 lines (32 loc) · 1.12 KB
/
validate-tables.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
name: Validate Markdown Tables
on:
pull_request:
branches:
- main # Run for PRs targeting the main branch
jobs:
validate-tables:
runs-on: ubuntu-latest
steps:
# Checkout the repository code
- name: Checkout Code
uses: actions/checkout@v3
# Set up Node.js environment
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: "16"
# Install markdownlint for validating Markdown syntax
- name: Install Markdownlint
run: npm install -g markdownlint-cli
# Validate all Markdown files in the repository
- name: Lint Markdown Files
run: markdownlint "**/*.md"
# Optional: Use a custom script to validate tables
- name: Validate Markdown Tables
run: |
npm install -g markdown-table-checker
find . -name "*.md" -exec markdown-table-checker {} \;
# Display a message if the checks fail
- name: Report Issues
if: failure()
run: echo "Broken Markdown tables detected. Please fix the issues listed above."