diff --git a/.github/workflows/vale-lint.yml b/.github/workflows/vale-lint.yml index bb38a7da2..92ce7e53f 100644 --- a/.github/workflows/vale-lint.yml +++ b/.github/workflows/vale-lint.yml @@ -7,8 +7,18 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 + with: + fetch-depth: 0 # Fetch all history to compare changes + + - name: Get changed files + id: changed-files + uses: tj-actions/changed-files@v41 + with: + files: content/**/*.md # Only check markdown files in the content directory + - uses: errata-ai/vale-action@v2.1.1 + if: steps.changed-files.outputs.any_changed == 'true' with: fail_on_error: true token: ${{secrets.GITHUB_TOKEN}} - files: ./content \ No newline at end of file + files: ${{ steps.changed-files.outputs.all_changed_files }} \ No newline at end of file