Skip to content

Commit 45921fe

Browse files
authored
pipeline + validate_and_fix_markdown.yml
1 parent 91b6c61 commit 45921fe

File tree

1 file changed

+44
-0
lines changed

1 file changed

+44
-0
lines changed
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: Validate and Fix Markdown
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- main
7+
push:
8+
branches:
9+
- main
10+
11+
permissions:
12+
contents: write
13+
14+
jobs:
15+
validate-and-fix-markdown:
16+
runs-on: ubuntu-latest
17+
18+
steps:
19+
- name: Checkout repository
20+
uses: actions/checkout@v4
21+
with:
22+
fetch-depth: 0
23+
24+
- name: Set up Python
25+
uses: actions/setup-python@v4
26+
with:
27+
python-version: '3.x'
28+
29+
- name: Install Markdown Linter
30+
run: pip install markdownlint-cli
31+
32+
- name: Lint and Fix Markdown files
33+
run: markdownlint '**/*.md' --fix
34+
35+
- name: Configure Git
36+
run: |
37+
git config --global user.email "github-actions[bot]@users.noreply.github.com"
38+
git config --global user.name "github-actions[bot]"
39+
40+
- name: Commit changes
41+
run: |
42+
git add -A
43+
git commit -m "Fix Markdown syntax issues" || echo "No changes to commit"
44+
git push origin HEAD:${{ github.event.pull_request.head.ref }}

0 commit comments

Comments
 (0)