Update BAPC21-theme submodule #350
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: Grammar | |
# https://pawel.krupa.net.pl/2018/07/automate-your-grammar-checks/ | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
jobs: | |
textidote: | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Install textidote | |
run: | | |
wget https://github.com/sylvainhalle/textidote/releases/download/v0.8.1/textidote_0.8.1_all.deb | |
sudo dpkg -i textidote_0.8.1_all.deb | |
# Storage dir | |
- name: temp dir | |
run: mkdir temp | |
- name: new dict | |
run: cat .spelling | grep -v "^#" | grep -v "^ -" | sort | uniq > text.dict | |
# Make HTML interface | |
- name: Create HTML document | |
run: for file in `ls content`; do textidote --dict text.dict -check en --type md --output html content/$file > temp/$file.html|| true; done | |
- uses: actions/upload-artifact@v2 | |
with: | |
name: HTMLout | |
path: temp | |
# The actual check | |
- name: Remove problematic lines | |
run: grep -v "my_" content/rules.md > tmp && mv tmp content/rules.md | |
- name: Remove problematic lines | |
run: grep -v "run_" content/rules.md > tmp && mv tmp content/rules.md | |
- name: Remove problematic lines | |
run: grep -v "coenraads" content/rules.md > tmp && mv tmp content/rules.md | |
- name: Remove problematic lines | |
run: grep -v "redhat.java" content/rules.md > tmp && mv tmp content/rules.md | |
- name: Check document | |
run: for file in `ls content`; do textidote --dict text.dict --ignore lt:en:WORD_CONTAINS_UNDERSCORE,lt:en:SENTENCE_FRAGMENT,lt:en:CD_NN,lt:en:EN_QUOTES,lt:en:PUNCTUATION_PARAGRAPH_END --check en --type md content/$file; done | |
mdspell: | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Install mdspell | |
run: npm install markdown-spellcheck | |
- name: Check with mdspell | |
run: ./node_modules/markdown-spellcheck/bin/mdspell -r -n -a --en-us content/*.md | |
write-good: | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Install Write-good | |
run: npm install write-good | |
- name: Remove problematic lines | |
run: grep -v "An institution can earn additional team slots under the following conditions:" content/rules.md > tmp && mv tmp content/rules.md | |
- name: Remove problematic lines | |
run: grep -v "with the last page only printed" content/rules.md > tmp && mv tmp content/rules.md | |
- name: Check with Write-good | |
run: ./node_modules/.bin/write-good content/*.md --no-passive | |
markdown: | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Remove problematic lines | |
run: grep -v "{{< maps >}}" content/contest.md > tmp && mv tmp content/contest.md; echo "end" >> content/contest.md | |
- name: Check markdown | |
run: docker run -v $(pwd):/app --workdir=/app coala/base coala --ci --files content/*.md --bears=MarkdownBear | |