name: Codespell

on:
  pull_request:
    types: [opened, synchronize, reopened, ready_for_review]

jobs:
  spell-check:
    if: github.event.pull_request.draft == false
    runs-on: ubuntu-latest
    steps:
      -
        name: Checkout repository
        uses: actions/checkout@v3.1.0
      -
        name: Spell-Checking
        uses: codespell-project/actions-codespell@master
        with:
          ignore_words_file: .codespellignore
          skip: ./scripts/vendor,./style/vendor,./package.json,./package-lock.json,./composer.json,./composer.lock
