From 0f73aded4f0ab7d0b28597d77770df5636ed84a0 Mon Sep 17 00:00:00 2001 From: CJ42 Date: Fri, 22 Nov 2024 15:16:19 +0700 Subject: [PATCH] ci: move action to spellcheck CI workflow + adjust files to check --- .github/workflows/ci.yml | 6 ------ .github/workflows/spellcheck.yml | 16 +++++++++------- 2 files changed, 9 insertions(+), 13 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d262be0dde..744bbea645 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -30,12 +30,6 @@ jobs: - name: Prettier 🎨 run: yarn run prettier - - name: Check spelling errors in code snippets 🔍 - uses: codespell-project/actions-codespell@v2 - with: - check_filenames: true - check_hidden: true - - name: Build 🧱 run: yarn run build diff --git a/.github/workflows/spellcheck.yml b/.github/workflows/spellcheck.yml index bd6d8c1d06..61754cce3b 100644 --- a/.github/workflows/spellcheck.yml +++ b/.github/workflows/spellcheck.yml @@ -1,10 +1,12 @@ # This workflow checks for common grammar and spelling mistake in markdown docs files. name: Spellcheck -on: workflow_dispatch +on: + pull_request: + branches: [main] jobs: build: - name: Spellcheck + name: Check Grammar and Spelling errors runs-on: ubuntu-latest steps: - name: Checkout 🛎️ @@ -15,12 +17,12 @@ jobs: - name: Install ⚙️ run: yarn install --frozen-lockfile - - name: Spellcheck 📝 - uses: rojopolis/spellcheck-github-actions@0.33.0 + - name: Check spelling errors in code snippets 🔍 + uses: codespell-project/actions-codespell@v2 with: - source_files: docs/**/*.md docs/**/*.mdx - task_name: Markdown - output_file: spellcheck-output.txt + check_filenames: true + check_hidden: true + skip: yarn.lock,./node_modules/**/*,./node_modules/.*,./yarn/**/*,./.yarn/**/* - name: Output Spellcheck Results 📝 uses: actions/upload-artifact@v3