Lint
This commit is contained in:
57
.github/workflows/validate_markdown.yml
vendored
57
.github/workflows/validate_markdown.yml
vendored
@@ -1,5 +1,7 @@
|
||||
---
|
||||
name: Validate Markdown
|
||||
|
||||
# yamllint disable-line rule:truthy
|
||||
on:
|
||||
pull_request:
|
||||
paths:
|
||||
@@ -14,37 +16,38 @@ jobs:
|
||||
name: Markdown Lint
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Check out code
|
||||
uses: actions/checkout@v4.1.0
|
||||
- name: Check out code
|
||||
uses: actions/checkout@v4.1.0
|
||||
|
||||
# https://github.com/marketplace/actions/markdownlint-cli2-action
|
||||
- name: Identify changed files
|
||||
uses: tj-actions/changed-files@v41
|
||||
id: changed-files
|
||||
with:
|
||||
files: '**/*.md'
|
||||
separator: ","
|
||||
# https://github.com/marketplace/actions/markdownlint-cli2-action
|
||||
- name: Markdown Lint
|
||||
uses: DavidAnson/markdownlint-cli2-action@v14
|
||||
if: steps.changed-files.outputs.any_changed == 'true'
|
||||
with:
|
||||
globs: ${{ steps.changed-files.outputs.all_changed_files }}
|
||||
separator: ","
|
||||
config: '.rules/.markdownlint.jsonc'
|
||||
fix: true
|
||||
# https://github.com/marketplace/actions/markdownlint-cli2-action
|
||||
- name: Identify changed files
|
||||
uses: tj-actions/changed-files@v41
|
||||
id: changed-files
|
||||
with:
|
||||
files: '**/*.md'
|
||||
separator: ","
|
||||
# https://github.com/marketplace/actions/markdownlint-cli2-action
|
||||
- name: Markdown Lint
|
||||
uses: DavidAnson/markdownlint-cli2-action@v14
|
||||
if: steps.changed-files.outputs.any_changed == 'true'
|
||||
with:
|
||||
globs: ${{ steps.changed-files.outputs.all_changed_files }}
|
||||
separator: ","
|
||||
config: '.rules/.markdownlint.jsonc'
|
||||
fix: true
|
||||
|
||||
markdown-links:
|
||||
name: Check links
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Check out code
|
||||
uses: actions/checkout@v4.1.0
|
||||
- name: Check out code
|
||||
uses: actions/checkout@v4.1.0
|
||||
|
||||
# https://github.com/gaurav-nelson/github-action-markdown-link-check
|
||||
- name: Markdown links
|
||||
uses: gaurav-nelson/github-action-markdown-link-check@v1
|
||||
with:
|
||||
check-modified-files-only: yes
|
||||
config-file: '.rules/mlc_config.json'
|
||||
base-branch: 'main'
|
||||
# https://github.com/gaurav-nelson/github-action-markdown-link-check
|
||||
- name: Markdown links
|
||||
uses: gaurav-nelson/github-action-markdown-link-check@v1
|
||||
with:
|
||||
check-modified-files-only: yes
|
||||
config-file: '.rules/mlc_config.json'
|
||||
base-branch: 'main'
|
||||
...
|
||||
|
||||
Reference in New Issue
Block a user