Skip to content

Commit 12c182c

Browse files
committed
build: Docs
- Adds Github actions to generate docs
1 parent a15b32e commit 12c182c

File tree

1 file changed

+43
-0
lines changed

1 file changed

+43
-0
lines changed

.github/workflows/docs.yml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: Generate Documentation
2+
3+
on:
4+
push:
5+
branches:
6+
- main # Run on pushes to the main branch
7+
pull_request:
8+
branches:
9+
- main
10+
11+
jobs:
12+
generate-docs:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- name: Checkout code
16+
uses: actions/checkout@v3
17+
18+
- name: Set up Node.js
19+
uses: actions/setup-node@v3
20+
with:
21+
node-version: 'latest'
22+
cache: 'npm'
23+
24+
- name: Install dependencies
25+
run: npm install @microsoft/tsdoc typedoc
26+
27+
- name: Generate documentation
28+
run: npm run docs
29+
30+
- name: Upload documentation to GitHub Pages
31+
uses: actions/upload-pages-artifact@v1
32+
with:
33+
path: ./public/docs # Path where docs are generated
34+
35+
deploy:
36+
needs: generate-docs
37+
runs-on: ubuntu-latest
38+
permissions:
39+
pages: write
40+
id-token: write
41+
steps:
42+
- name: Deploy to GitHub Pages
43+
uses: actions/deploy-pages@v1

0 commit comments

Comments
 (0)