-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
53 lines (46 loc) · 1.52 KB
/
Copy pathlint-ja-docs.yml
File metadata and controls
53 lines (46 loc) · 1.52 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
45
46
47
48
49
50
51
52
53
name: Lint Japanese Documentation
on:
push:
branches: [main]
paths:
- 'src/content/docs/ja/**'
- '.textlintrc.ja.json'
pull_request:
paths:
- 'src/content/docs/ja/**'
- '.textlintrc.ja.json'
# Automatically cancel in-progress actions on the same branch
concurrency:
group: ${{ github.workflow }}-${{ github.event_name == 'pull_request_target' && github.head_ref || github.ref }}
cancel-in-progress: true
jobs:
textlint:
name: Run textlint on Japanese documentation
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Install Tools & Dependencies
uses: ./.github/actions/install
with:
node-version: 20
- name: Run textlint
id: textlint
run: |
echo "::group::Running textlint on Japanese documentation"
set +e
pnpm run lint:ja 2>&1 | tee textlint-output.txt
TEXTLINT_EXIT_CODE=${PIPESTATUS[0]}
set -e
echo "::endgroup::"
echo "exit_code=$TEXTLINT_EXIT_CODE" >> $GITHUB_OUTPUT
exit $TEXTLINT_EXIT_CODE
continue-on-error: true
- name: Report textlint results
if: always() && steps.textlint.outputs.exit_code != '0'
run: |
echo "::error::textlint found issues in Japanese documentation"
cat textlint-output.txt
echo "To fix these issues locally, run: pnpm run lint:ja"
exit 1