diff --git a/.github/workflows/vale.yml b/.github/workflows/vale.yml new file mode 100644 index 000000000..20686f7bd --- /dev/null +++ b/.github/workflows/vale.yml @@ -0,0 +1,37 @@ +name: Vale style check +on: + pull_request: + paths: + - '**.mdx' + - '**.md' + - '.vale/**' + - '.vale.ini' + - '!**/changelog/**' + +jobs: + vale: + runs-on: ubuntu-latest + if: | + github.event.pull_request.user.login != 'fern-support' && + github.event.pull_request.user.login != 'github-actions' + steps: + - uses: actions/checkout@v4 + + - name: Get changed files + id: changed-files + uses: tj-actions/changed-files@v41 + with: + files: | + fern/**/*.md + fern/**/*.mdx + files_ignore: | + **/changelog/** + - uses: errata-ai/vale-action@reviewdog + if: steps.changed-files.outputs.any_changed == 'true' + with: + files: ${{ steps.changed-files.outputs.all_changed_files }} + version: 3.12.0 + reporter: github-pr-review + fail_on_error: false + env: + GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} \ No newline at end of file diff --git a/.vale.ini b/.vale.ini index 46c368d0f..c3787ee06 100644 --- a/.vale.ini +++ b/.vale.ini @@ -22,6 +22,7 @@ Microsoft.Vocab = NO Microsoft.Semicolon = NO # Mostly just picks up code Microsoft.SentenceLength = NO # Mostly just picks up code Microsoft.Dashes = NO +Microsoft.Foreign = NO # Not relevant for Fern audience Microsoft.GeneralURL = NO