-
Notifications
You must be signed in to change notification settings - Fork 162
36 lines (31 loc) · 1.22 KB
/
markdown_linter.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
name: Linting Quarto Markdown files
on:
push:
pull_request:
jobs:
lint-qmd-files:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Installing GitHub CLI
run: |
sudo apt -y update && sudo apt -y upgrade
sudo apt -y install software-properties-common
sudo apt install -y gh jq nodejs npm
- 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/.mdlintconfig.yml --ignore-path .github/workflows/markdown_linter/.mdlintignore ./
ret=$?
if [ $ret -eq 1 ]; then
echo "Linting failed. Please correct any errors and run the job again."
exit 1
fi