-
Notifications
You must be signed in to change notification settings - Fork 6
45 lines (40 loc) · 1.65 KB
/
api-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
name: API docs
# Build and deploy documentation for code that is pushed to master.
on:
push:
branches: [ master ]
# Also allow running this workflow manually from the Actions tab.
workflow_dispatch:
jobs:
gen-api-docs:
# The type of runner that the job will run on
runs-on: ubuntu-latest
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v3
- name: Setup Node.js environment
uses: actions/setup-node@v3
with:
node-version: 18
# Set this option if you want the action to check for the latest available version that satisfies the version spec
#check-latest: # optional
# Optional registry to set up for auth. Will set the registry in a project level .npmrc and .yarnrc file, and set up auth to read in from env.NODE_AUTH_TOKEN
cache: npm
# Used to specify the path to a dependency file: package-lock.json, yarn.lock, etc. Supports wildcards or a list of file names for caching multiple dependencies.
cache-dependency-path: package-lock.json
# Runs a single command using the runners shell
- name: Build the Docs
run: |
npm install
npm run doc
- name: Deploy to GitHub Pages
uses: Cecilapp/GitHub-Pages-deploy@v3
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
email: [email protected]
build_dir: docs
branch: gh-pages
#cname: domain.tld # optional
jekyll: no # optional
#commit_message: custom message # optional