Repository navigation
70 lines (63 loc) · 2.16 KB
/
Copy pathdocs.yml
File metadata and controls
70 lines (63 loc) · 2.16 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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
name: Docs
# ci.yml ignores docs paths, so docs-only PRs need their own lane. The links
# gate builds the site and checks the rendered pages, so the rspress version
# (website/package.json, the lockfile) and config re-run it as well.
on:
pull_request:
paths:
- 'website/docs/**'
- 'website/package.json'
- 'website/rspress.config.ts'
- 'README.md'
- 'scripts/check-doc-links.ts'
- 'scripts/__tests__/check-doc-links.test.ts'
- 'scripts/check-doc-prose.ts'
- 'scripts/__tests__/check-doc-prose.test.ts'
- 'scripts/check-affected/**'
- 'package.json'
- 'pnpm-lock.yaml'
- '.github/actions/run-gate/action.yml'
- '.github/actions/setup-node-pnpm/action.yml'
- '.github/workflows/docs.yml'
push:
branches:
- main
paths:
- 'website/docs/**'
- 'website/package.json'
- 'website/rspress.config.ts'
- 'README.md'
- 'scripts/check-doc-links.ts'
- 'scripts/__tests__/check-doc-links.test.ts'
- 'scripts/check-doc-prose.ts'
- 'scripts/__tests__/check-doc-prose.test.ts'
- 'scripts/check-affected/**'
- 'package.json'
- 'pnpm-lock.yaml'
- '.github/actions/run-gate/action.yml'
- '.github/actions/setup-node-pnpm/action.yml'
- '.github/workflows/docs.yml'
permissions:
contents: read
concurrency:
group: >-
ci-${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.ref || github.sha }}
cancel-in-progress: true
jobs:
check:
name: Prose, internal links, and heading anchors
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Setup Node and pnpm
uses: ./.github/actions/setup-node-pnpm
# Reads the Markdown sources only, so it fails before the site build.
- name: Check docs prose
uses: ./.github/actions/run-gate
with: { gate: docs-prose }
# Builds the site (root install covers the website workspace), then checks it.
- name: Check docs links
uses: ./.github/actions/run-gate
with: { gate: docs-links }