diff --git a/.github/workflows/pr-check.yaml b/.github/workflows/pr-check.yaml new file mode 100644 index 00000000..81b76ac0 --- /dev/null +++ b/.github/workflows/pr-check.yaml @@ -0,0 +1,39 @@ +name: Pull Request Checks + +on: + pull_request: + branches: + - main + workflow_dispatch: + +jobs: + spellcheck: + name: Spellcheck + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4.1.0 + name: Checkout + - uses: jitterbit/get-changed-files@v1 + id: changed_files + name: Get changed files + - id: md_changed_files + name: Spellcheck Markdown files + run: |- + files='' + for f in ${{ steps.changed_files.outputs.all }} + do + ext="${f##*.}" + if [ $ext = "md" || $ext = "mdx" ]; + then + files="${f} ${files}" + fi + done + + echo "files=${files}" >> $GITHUB_ENV + - uses: rojopolis/spellcheck-github-actions@0.41.0 + name: Spellcheck + if: ${{ env.files }} + with: + source_files: ${{ env.files }} + task_name: Markdown