Add Harper workflow for grammar and style checks #11
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Harper | |
| on: | |
| pull_request: | |
| workflow_dispatch: | |
| jobs: | |
| harper: | |
| name: Grammar and Style Check | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: Install Harper CLI | |
| run: cargo install --git https://github.com/Automattic/harper harper-cli --locked | |
| - name: Generate Harper JSON Report | |
| run: | | |
| find docs src/pages -type f \( -name "*.md" -o -name "*.mdx" \) -print0 | \ | |
| xargs -0 harper-cli lint \ | |
| --user-dict-path ./.harper-dictionary.txt \ | |
| --format json \ | |
| > harper-report.json || true | |
| - name: Show Harper Report | |
| run: cat harper-report.json | |
| - name: Run Harper | |
| run: | | |
| find docs src/pages -type f \( -name "*.md" -o -name "*.mdx" \) -print0 | \ | |
| xargs -0 harper-cli lint \ | |
| --user-dict-path ./.harper-dictionary.txt |