-
Notifications
You must be signed in to change notification settings - Fork 51
44 lines (38 loc) · 1.25 KB
/
lint-sentence-newline.yml
File metadata and controls
44 lines (38 loc) · 1.25 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
name: Sentence Newline Lint
on:
pull_request:
types: [opened, synchronize, reopened]
paths:
["**/*.md", "**/*.mdx", ".github/workflows/lint-sentence-newline.yml"]
permissions:
contents: read
jobs:
lint-sentence-newline:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Get changed markdown files
id: changed-files
uses: tj-actions/changed-files@v47
with:
base_sha: ${{ github.event.pull_request.base.sha }}
sha: ${{ github.event.pull_request.head.sha }}
include_all_old_new_renamed_files: true
files: |
docs/**/*.md
docs/**/*.mdx
- name: Setup Node.js
if: steps.changed-files.outputs.any_changed == 'true'
uses: actions/setup-node@v4
with:
node-version: 22
cache: "npm"
- name: Install dependencies
if: steps.changed-files.outputs.any_changed == 'true'
run: npm ci --include=dev
- name: Run sentence newline lint
if: steps.changed-files.outputs.any_changed == 'true'
run: npx textlint --config .textlintrc.json ${{ steps.changed-files.outputs.all_changed_files }}