Skip to content

Added github action to lint markdown files. Addresses #55 #1

Added github action to lint markdown files. Addresses #55

Added github action to lint markdown files. Addresses #55 #1

Workflow file for this run

name: Linting Markdown files
on:
push:
pull_request:
jobs:
update-contributors:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Python3.11
uses: actions/setup-python@v4
with:
python-version: 3.11
- name: Installing GitHub CLI
run: |
sudo apt install -y gh jq nodejs npm
- name: Installing python packages
run: |
python -m pip install --upgrade pip
pip install -r .github/workflows/markdown_linter/requirements.txt
- name: Installing Markdown Linter
run: |
sudo npm install -g markdownlint-cli
- name: Markdown linting job has been triggered
run: |
echo "The job was automatically triggered by a ${{ github.event_name }} event."
- name: Running markdown linter
run: |
markdownlint --config .github/workflows/markdown_linter/.markdownlint.yml --ignore-file .github/workflows/markdown_linter/mdlintignore.yml
ret=$?
if [ $ret -eq 1 ]; then
echo "Linting failed. Please correct any errors and run the job again."
exit 1
fi