-
Notifications
You must be signed in to change notification settings - Fork 13k
40 lines (36 loc) · 1009 Bytes
/
formatting.yml
File metadata and controls
40 lines (36 loc) · 1009 Bytes
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
name: "🧹 Markdown Format Check"
on:
push:
pull_request:
permissions:
contents: read
pull-requests: write
jobs:
prettier:
name: Prettier check (non-blocking)
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: 20
cache: npm
- name: Install dependencies
run: npm ci
- name: Run Prettier check
id: prettier
continue-on-error: true
run: |
npx prettier --check "**/*.md" || true
- name: Summary
if: always()
run: |
if [ "${{ steps.prettier.outcome }}" != "success" ]; then
echo "⚠️ Formatting differences detected. Run 'npm run format' locally." >> $GITHUB_STEP_SUMMARY
else
echo "✅ All markdown files are properly formatted." >> $GITHUB_STEP_SUMMARY
fi