Skip to content

Commit 1f026c0

Browse files
committed
GitHub action to write docs
1 parent 1ca6b63 commit 1f026c0

File tree

2 files changed

+36
-1
lines changed

2 files changed

+36
-1
lines changed

.github/workflows/docs.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: "Build Documentation"
2+
on:
3+
push:
4+
branches: [master]
5+
6+
jobs:
7+
build:
8+
runs-on: ubuntu-latest
9+
permissions:
10+
pages: write # to deploy to Pages
11+
id-token: write # to verify the deployment originates from an appropriate source
12+
13+
environment:
14+
name: github-pages
15+
url: ${{ steps.deployment.outputs.page_url }}
16+
17+
steps:
18+
- uses: actions/checkout@v3
19+
- name: Use Node.js 18
20+
uses: actions/[email protected]
21+
with:
22+
node-version: 18
23+
cache: "npm"
24+
- run: npm ci
25+
- run: npm run docs
26+
- name: Setup Pages
27+
uses: actions/configure-pages@v1
28+
- name: Upload artifact
29+
uses: actions/upload-pages-artifact@v1
30+
with:
31+
path: "docs"
32+
- name: Deploy to GitHub Pages
33+
id: deployment
34+
uses: actions/deploy-pages@main

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@
99
"test": "mocha --require ts-node/register tests/**/*.test.ts",
1010
"build": "tsc -b",
1111
"lint": "prettier --check . && eslint . --ext .ts",
12-
"lint-fix": "prettier --write . && eslint . --ext .ts --fix"
12+
"lint-fix": "prettier --write . && eslint . --ext .ts --fix",
13+
"docs": "typedoc --out docs src/index.ts"
1314
},
1415
"repository": {
1516
"type": "git",

0 commit comments

Comments
 (0)