-
-
Notifications
You must be signed in to change notification settings - Fork 0
41 lines (33 loc) · 1.15 KB
/
test_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
name: Test Docs
on: pull_request
jobs:
build:
name: Test docs
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v1
- name: Install Node v14
uses: actions/setup-node@v1
with:
node-version: 14
- name: Install dependencies
run: |
npm install
# Clone typedoc theme, build, and link because for whatever reason
# installing the deps and building from within node_modules fails
cd ../
git clone https://github.com/discord-samba/typedoc-themes.git
cd typedoc-themes
npm install
npm run build
npm link
# CD back to main repo and link theme to dependencies
cd ../$(echo '${{ github.repository }}' | grep -oP '/\K.+')
npm link @discord-samba/typedoc-themes
- name: Test building docs
id: build_status
run: echo "##[set-output name=status;]$(node scripts/typedoc-runner | grep 'Error')"
- name: Fail if docs build produced errors
if: contains(steps.build_status.outputs.status, 'Error') == true
run: exit 1