-
Notifications
You must be signed in to change notification settings - Fork 18
55 lines (44 loc) · 1.38 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
45
46
47
48
49
50
51
52
53
54
55
name: Build and Publish API Docs
on:
push:
branches:
- master
- 65-api-docs
jobs:
build-and-publish-docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Use Node.js 16
uses: actions/setup-node@v2
with:
node-version: 16
- name: Get Node.js version
id: get-node-version
run: echo "::set-output name=node-version::$(node --version)"
- name: Install Yarn
if: ${{ env.ACT }}
run: npm i yarn -g
- name: Get yarn cache directory path
id: get-yarn-cache-path
run: |
yarn cache dir
echo "::set-output name=yarn-cache-path::$(yarn cache dir)"
- uses: actions/cache@v2
id: yarn-cache
with:
path: ${{ steps.get-yarn-cache-path.outputs.yarn-cache-path }}
key: ${{ runner.os }}_node-${{ steps.get-node-version.outputs.node-version }}_yarn-${{ hashFiles('**/yarn.lock') }}
- name: 📦 Install Dependencies
run: |
yarn install --frozen-lockfile
cd docs
yarn install --frozen-lockfile
- name: 📚 Docs - 🔨 Build
working-directory: docs
run: yarn typedoc
- name: 📚 Docs - 🚀 Publish
uses: JamesIves/[email protected]
with:
branch: gh-pages # The branch the action should deploy to.
folder: docs/dist # The folder the action should deploy.