Lint Front Matter #149
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: Test | |
on: | |
push: | |
branches: [ master ] | |
pull_request: | |
branches: [ master ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Check for external links without target="_blank" attribute | |
run: | | |
! git grep --perl-regexp --only-matching -e '\[[^\]]*\]\([^\/][^)|{%]*\)(?!{)' -- '*.md' | |
typos: | |
name: Typos | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Search for misspellings | |
uses: crate-ci/typos@master | |
lint_front_matter: | |
name: Lint Front Matter | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Install yamllint | |
run: pip install --user yamllint | |
- name: Remove document contents | |
run: | | |
git ls-files -z -- '_posts/**.md' | xargs -0 -n 1 -- sed -i -e 'N;P;/---\n$/Q;D' | |
- name: Check Front Matter | |
run: | | |
git ls-files -z -- '_posts/**.md' | xargs -0 -n 1 -- python -m yamllint |