Skip to content

Commit

Permalink
ci: add linting pipeline for markdown files with prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
sacklippe committed May 19, 2024
1 parent 43ed429 commit 737b83d
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/markdown-lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Lint Markdown with Prettier

on:
push:
paths:
- '**/*.md'
pull_request:
paths:
- '**/*.md'

jobs:
prettier:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: '16'

- name: Install dependencies
run: npm install --save-dev prettier

- name: Run Prettier check
run: npx prettier --check '**/*.md'

- name: Prettier report
if: failure()
run: echo "Markdown files are not formatted correctly."

0 comments on commit 737b83d

Please sign in to comment.