forked from zwave-js/node-zwave-js
-
Notifications
You must be signed in to change notification settings - Fork 0
52 lines (43 loc) · 1.23 KB
/
generate-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
45
46
47
48
49
50
51
52
name: Generate documentation
# Run this workflow on all pushes to master and pull requests
on:
push:
branches:
- master
pull_request: {}
jobs:
# This job checks if the docs can be generated and produce changes
# If they do, a PR will be created with the changes
check-and-update:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [14.x] # This should be LTS
outputs:
CHANGES: ${{ steps.changes.outputs.CHANGES }}
steps:
- name: Checkout code
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
cache: 'yarn'
- name: Install dependencies
run: yarn install --immutable
- name: Compile TypeScript code
run: yarn run build
- name: Generate documentation
run: yarn run docs:generate
# Trigger this step only when pushing to master
- name: Create or update PR
if: |
github.event_name == 'push' &&
github.ref == 'refs/heads/master'
uses: ./.github/actions/generateTypedDocs
with:
githubToken: ${{ secrets.BOT_TOKEN }}
env:
CI: true