chore(lint): Fixed 90-95% of Markdown lint violations across the repository #3
Workflow file for this run
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
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 |