diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index d1a6e65..93635b4 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -7,19 +7,37 @@ on: jobs: spellchecking: - name: Checking + name: Spellchecking runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 + - uses: actions/checkout@v4 with: repository: rust-lang-ru/common-configs path: common-configs - - run: npm install yaspeller - - run: git show -m --name-only -1 --format="format:" | grep --color=never -i '.md' | xargs node_modules/.bin/yaspeller -c common-configs/.yaspellerrc + - name: Get all changed markdown files + uses: tj-actions/changed-files@v45 + id: changed_files + with: + files: | + async-book-ru/**/*.md + README.md + - name: List changed files + if: steps.changed_files.outputs.any_changed == 'true' + env: + ALL_CHANGED_FILES: ${{ steps.changed_files.outputs.all_changed_files }} + run: | + for file in ${ALL_CHANGED_FILES}; do + echo "$file was changed" + done + - uses: funkill/spellcheck-github-actions@hunspell-support-action + if: steps.changed_files.outputs.any_changed == 'true' + with: + task_name: Markdown + source_files: ${{ steps.changed_files.outputs.all_changed_files }} gitlocalize-bug-checking: name: Checking Gitlocalize bugs runs-on: ubuntu-latest steps: - - uses: actions/checkout@v1 + - uses: actions/checkout@v4 - uses: rust-lang-ru/simpleinfra/gitocalize-bug-checker@master diff --git a/spellcheck.yaml b/spellcheck.yaml new file mode 100644 index 0000000..421cf20 --- /dev/null +++ b/spellcheck.yaml @@ -0,0 +1,18 @@ +matrix: +- name: Markdown + hunspell: + d: ru_RU,en_US + dictionary: + wordlists: + - common-configs/wordlist.txt + encoding: utf-8 + pipeline: + - pyspelling.filters.html: + comments: false + ignores: + - code + - pre + sources: + - 'async-book-ru/**/*.md' + - README.md + default_encoding: utf-8