make footer logo clickable #39
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: Spellcheck Markdown | |
on: [push, pull_request] | |
jobs: | |
spellcheck: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Set up Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: '3.x' | |
- name: Install codespell | |
run: pip install codespell | |
- name: Filter files and run codespell | |
run: | | |
# Create a temporary file to store words to ignore | |
TEMP_IGNORE_FILE=$(mktemp) | |
# Extract all fully capitalized words from Markdown files and add them to the ignore list | |
grep -oE '\b[A-Z][A-Z]+\b' $(git ls-files '*.md') | sort -u >> $TEMP_IGNORE_FILE | |
# Extract capitalized words that may be proper nouns | |
grep -oE '\b[A-Z][a-z]+\b' $(git ls-files '*.md') | sort -u >> $TEMP_IGNORE_FILE | |
# Remove duplicate entries | |
sort -u $TEMP_IGNORE_FILE -o $TEMP_IGNORE_FILE | |
# Run codespell on Markdown files with dynamically generated ignore list | |
codespell --ignore-words-list="$(tr '\n' ',' < $TEMP_IGNORE_FILE)" $(git ls-files '*.md') | |
# Clean up | |
rm $TEMP_IGNORE_FILE |