-
-
Notifications
You must be signed in to change notification settings - Fork 616
44 lines (43 loc) · 1.17 KB
/
docs.yml
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: Docs
on:
pull_request:
paths:
- 'docs/**'
- 'website/**'
- package.json
- package-lock.json
# Keep the following in sync with website/scripts/regenerate-api.js
- src/options.ts
- src/chain/validators.ts
- src/chain/sanitizers.ts
push:
paths:
- 'docs/**'
- 'website/**'
- package.json
- package-lock.json
# Keep the following in sync with website/scripts/regenerate-api.js
- src/options.ts
- src/chain/validators.ts
- src/chain/sanitizers.ts
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Check out
uses: actions/checkout@v2
- name: Set up Node.js
uses: actions/setup-node@v2
with:
node-version: 18
cache: npm
- name: Set up npm cache
uses: ./.github/actions/npm-cache
- name: Install dependencies
run: npm ci
- name: Update validator APIs
run: npm run docs:regenerate-api
- name: Verify up-to-date
run: git diff --quiet --exit-code || echo "Docs not up-to-date, please rerun `npm run docs:regenerate-api`"
- name: Build
run: npm run docs:build