name: Spelling Check

on:
  schedule:
    - cron: "0 0 * * 2"

permissions:
  contents: read

jobs:
  codespell:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v2
    - name: Install codespell
      run: sudo pip install codespell
    - name: Run codespell
      run: |
        codespell \
          -c \
          -q 2 \
          --ignore-words-list ist,ists,hist,wan,ca,cas,que,ans,te,nd,referer,ot,uint,iif,fo,keep-alives,dosen \
          --skip="CHANGELOG,Makefile,*.fig,*.pem"
