-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: add linting pipeline for markdown files with prettier
- Loading branch information
sacklippe
committed
May 19, 2024
1 parent
43ed429
commit 737b83d
Showing
1 changed file
with
32 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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." |