more clarity #259
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: Check any new content | |
on: | |
push: | |
paths: | |
- 'content/**.md' | |
jobs: | |
markdownlint: | |
name: Check markdown | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Use Node.js | |
uses: actions/setup-node@v1 | |
with: | |
node-version: 16.13.0 | |
- name: Install Alex | |
run: npm install markdownlint-cli@0.30.0 --global | |
- name: Test content with markdownlint | |
run: | | |
for file_path in $(git diff --name-only origin/main | grep '^content/'); do | |
markdownlint --disable MD013 MD041 "$file_path"; | |
done | |
test-language: | |
name: Test for biased language | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Use Node.js 12 | |
uses: actions/setup-node@v1 | |
with: | |
node-version: 16.13.0 | |
- name: Install Alex | |
run: npm install alex@10.0.0 --global | |
- name: Test content with alex | |
run: | | |
for file_path in $(git diff --name-only origin/main | grep '^content/'); do | |
alex "$file_path"; | |
done | |
test-complexity: | |
name: Get report on language complexity | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 | |
- name: Set up Python 3.7 | |
uses: actions/setup-python@v2 | |
with: | |
python-version: 3.7 | |
- name: Install language complexity tools | |
run: python3 -m pip install textstat-cli==1.1.3 | |
- name: Get language complexity report | |
run: | | |
for file_path in $(git diff --name-only origin/main | grep '^content/'); do | |
python3 -m textstat_cli "$file_path" | |
done | |
test-spelling: | |
name: Use GrammarBot to check for spelling and grammar | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Set up Python 3.7 | |
uses: actions/setup-python@v2 | |
with: | |
python-version: 3.7 | |
- name: Install grammaerbot CLI tool | |
run: python3 -m pip install hemoglobin==0.0.11 | |
- name: Get grammarbot report | |
run: | | |
for file_path in $(git diff --name-only origin/main | grep '^content/'); do | |
python3 -m hemoglobin ${{ secrets.GRAMMARBOT_APIKEY }} "$file_path" | |
done | |
grammar-check: | |
name: Use write-good to check usage of language | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Use Node.js 12 | |
uses: actions/setup-node@v1 | |
with: | |
node-version: 16.13.0 | |
- name: Install write-good | |
run: npm install write-good@1.0.8 --global | |
- name: Test content with write-good | |
continue-on-error: true | |
run: | | |
for file_path in $(git diff --name-only origin/main | grep '^content/'); do | |
write-good --parse "$file_path" | |
done |