-
Notifications
You must be signed in to change notification settings - Fork 5.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(ci): Corrected Markdown file change detection in workflows markdo…
…wn-lint.yml
- Loading branch information
1 parent
fa719f7
commit 7c41d7e
Showing
2 changed files
with
105 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,36 @@ | ||
name: Markdown Lint Check | ||
|
||
on: | ||
pull_request: | ||
paths: | ||
- '**/*.md' | ||
push: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
markdown-lint: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout Code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Check if Markdown Files Changed | ||
id: check_changes | ||
run: | | ||
if git diff --name-only ${{ github.event.before }} ${{ github.sha }} | grep -E '\.md$'; then | ||
echo "changed=true" >> $GITHUB_OUTPUT | ||
else | ||
echo "changed=false" >> $GITHUB_OUTPUT | ||
fi | ||
- name: Install Markdownlint | ||
if: steps.check_changes.outputs.changed == 'true' | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install -y markdownlint-cli | ||
- name: Run Markdownlint Check | ||
if: steps.check_changes.outputs.changed == 'true' | ||
run: | | ||
markdownlint '**/*.md' --config .markdownlint.json |
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,69 @@ | ||
{ | ||
"code-block-style": { | ||
"style": "fenced" | ||
}, | ||
"code-fence-style": { | ||
"style": "backtick" | ||
}, | ||
"emphasis-style": { | ||
"style": "asterisk" | ||
}, | ||
"extended-ascii": { | ||
"ascii-only": true | ||
}, | ||
"fenced-code-language": { | ||
"allowed_languages": [ | ||
"bash", | ||
"go", | ||
"html", | ||
"javascript", | ||
"json", | ||
"markdown", | ||
"text" | ||
], | ||
"language_only": true | ||
}, | ||
"heading-style": { | ||
"style": "atx" | ||
}, | ||
"hr-style": { | ||
"style": "---" | ||
}, | ||
"line-length": { | ||
"strict": true, | ||
"code_blocks": false | ||
}, | ||
"link-image-style": { | ||
"collapsed": false, | ||
"shortcut": false, | ||
"url_inline": false | ||
}, | ||
"no-duplicate-heading": { | ||
"siblings_only": true | ||
}, | ||
"ol-prefix": { | ||
"style": "ordered" | ||
}, | ||
"proper-names": { | ||
"code_blocks": false, | ||
"names": [ | ||
"Cake.Markdownlint", | ||
"CommonMark", | ||
"JavaScript", | ||
"Markdown", | ||
"markdown-it", | ||
"markdownlint", | ||
"Node.js", | ||
"Go" | ||
] | ||
}, | ||
"reference-links-images": { | ||
"shortcut_syntax": true | ||
}, | ||
"strong-style": { | ||
"style": "asterisk" | ||
}, | ||
"ul-style": { | ||
"style": "dash" | ||
} | ||
} |