File tree Expand file tree Collapse file tree 1 file changed +45
-0
lines changed
Expand file tree Collapse file tree 1 file changed +45
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Validate and Fix Markdown
2+
3+ on :
4+ pull_request :
5+ branches :
6+ - main
7+
8+ permissions :
9+ contents : write
10+ pull-requests : write
11+
12+ jobs :
13+ validate-and-fix-markdown :
14+ runs-on : ubuntu-latest
15+
16+ steps :
17+ - name : Checkout repository
18+ uses : actions/checkout@v4
19+ with :
20+ fetch-depth : 0
21+
22+ - name : Set up Node.js
23+ uses : actions/setup-node@v3
24+ with :
25+ node-version : ' 16'
26+
27+ - name : Install Markdown Linter
28+ run : npm install -g markdownlint-cli
29+
30+ - name : Lint and Fix Markdown files
31+ run : markdownlint '**/*.md' --fix --config .github/.markdownlint.json --ignore GPT-RAG_SolutionAccelerator/
32+
33+ - name : Configure Git
34+ run : |
35+ git config --global user.email "github-actions[bot]@users.noreply.github.com"
36+ git config --global user.name "github-actions[bot]"
37+
38+ - name : Commit and rebase changes
39+ env :
40+ PR_BRANCH : ${{ github.head_ref || github.ref_name }}
41+ run : |
42+ git add -A
43+ git commit -m "Fix Markdown syntax issues" || echo "No changes to commit"
44+ git pull --rebase origin "$PR_BRANCH" || echo "No rebase needed"
45+ git push origin HEAD:"$PR_BRANCH"
You can’t perform that action at this time.
0 commit comments