Skip to content
This repository was archived by the owner on Jul 9, 2025. It is now read-only.

Commit fe65011

Browse files
committed
add a github action workflow
1 parent 58fa3b8 commit fe65011

File tree

1 file changed

+39
-0
lines changed

1 file changed

+39
-0
lines changed

.github/workflows/markdownlint.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: Lint Markdown Files
2+
on: [push, pull_request]
3+
4+
jobs:
5+
markdownlint:
6+
name: 'Markdown Lint'
7+
runs-on: ubuntu-latest
8+
steps:
9+
- uses: actions/checkout@v4
10+
with:
11+
fetch-depth: 2
12+
13+
- name: Setup Hugo
14+
uses: peaceiris/actions-hugo@v3
15+
with:
16+
hugo-version: '0.125.6'
17+
extended: true
18+
19+
- name: Setup Node
20+
uses: actions/setup-node@v4
21+
with:
22+
node-version: '20'
23+
24+
- name: Install and Build
25+
run: |
26+
npm install
27+
28+
- uses: tj-actions/changed-files@v24
29+
id: changed-files
30+
with:
31+
files: 'content/**/*.md'
32+
separator: "\n"
33+
34+
- uses: DavidAnson/markdownlint-cli2-action@v6
35+
if: steps.changed-files.outputs.any_changed == 'true'
36+
with:
37+
globs: ${{ steps.changed-files.outputs.all_changed_files }}
38+
config: '.markdownlint-cli2.yaml'
39+

0 commit comments

Comments
 (0)