Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit e9431a6

Browse files
committed
Refactor docs lint workflow in docs-lint.yaml
- Restrict triggers to main branch and pull requests - Remove automatic fix option in markdownlint-cli2 command
1 parent fcaa917 commit e9431a6

File tree

1 file changed

+12
-5
lines changed

1 file changed

+12
-5
lines changed

.github/workflows/docs-lint.yaml

+12-5
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
1-
# Filtering pull requests is much easier when we can reliably guarantee
2-
# that the "Assignee" field is populated.
3-
name: Docs markdown lint
1+
name: Docs lint
42

5-
on: [push, pull_request]
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
68

79
jobs:
810
lint:
@@ -11,15 +13,20 @@ jobs:
1113
- uses: actions/checkout@v4
1214
with:
1315
fetch-depth: 0
16+
17+
- name: Setup Node
18+
uses: ./.github/actions/setup-node
19+
1420
- uses: tj-actions/changed-files@v45
1521
id: changed-files
1622
with:
1723
files: "docs/**/*.md"
1824
files_ignore: "docs/reference/*.md"
1925
separator: ","
26+
2027
- name: lint
2128
if: steps.changed-files.outputs.any_changed == 'true'
2229
run: |
2330
cd site
2431
../scripts/pnpm_install.sh
25-
pnpm exec markdownlint-cli2 --fix {{ steps.changed-files.outputs.all_changed_files }}
32+
pnpm exec markdownlint-cli2 {{ steps.changed-files.outputs.all_changed_files }}

0 commit comments

Comments
 (0)