Skip to content

Commit 277bec9

Browse files
authored
Update README.md
1 parent 93e9f62 commit 277bec9

File tree

1 file changed

+41
-0
lines changed

1 file changed

+41
-0
lines changed

README.md

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,47 @@ This `maxRetryAfterTime` option is for that `Retry-After`.
167167

168168
Default: `10`
169169

170+
## CI Integration
171+
172+
Probably, Link Checking take long times.
173+
We recommened to use cron job like GitHub Actions.
174+
175+
### textlint + [SARIF output](https://www.npmjs.com/package/@microsoft/eslint-formatter-sarif) + [code scanning](https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/about-code-scanning)
176+
177+
Following actions check links and upload the status to [code scanning](https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/about-code-scanning).
178+
179+
You can see the result at `https://github.com/{owner}/{repo}/security/code-scanning`.
180+
181+
```yaml
182+
name: Link Check
183+
on:
184+
workflow_dispatch:
185+
schedule:
186+
- cron: '45 15 * * *'
187+
188+
permissions:
189+
contents: read
190+
security-events: write
191+
192+
jobs:
193+
test:
194+
runs-on: ubuntu-latest
195+
name: Link Check
196+
steps:
197+
- uses: actions/checkout@v3
198+
- name: Setup Node.js
199+
uses: actions/setup-node@v3
200+
with:
201+
node-version: 18
202+
- run: npm ci
203+
- run: npx textlint -f @microsoft/eslint-formatter-sarif -o textlint.sarif || exit 0 # workaround https://github.com/textlint/textlint/issues/103
204+
- name: Upload SARIF file
205+
uses: github/codeql-action/upload-sarif@v2
206+
with:
207+
sarif_file: textlint.sarif
208+
category: textlint
209+
```
210+
170211
## Tests
171212
172213
```

0 commit comments

Comments
 (0)