Skip to content

Commit d7aac43

Browse files
authored
Add TypeDoc API reference deployed to GitHub Pages
Add TypeDoc configuration and a GitHub Actions workflow that builds and deploys the API reference to GitHub Pages on every push to main and on version tags. Output goes to `api-docs/` (separate from the hand-written `docs/` markdown). Add TSDoc comments to the handful of exported symbols that were missing them. Link the API reference from the README. Closes #10
1 parent e3fed64 commit d7aac43

8 files changed

Lines changed: 329 additions & 0 deletions

File tree

.github/workflows/docs.yml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
name: Docs
2+
3+
on:
4+
push:
5+
branches: [main]
6+
tags: ["v*.*.*"]
7+
workflow_dispatch:
8+
9+
permissions:
10+
contents: read
11+
pages: write
12+
id-token: write
13+
14+
concurrency:
15+
group: pages
16+
cancel-in-progress: false
17+
18+
jobs:
19+
deploy:
20+
name: Deploy TypeDoc to Pages
21+
environment:
22+
name: github-pages
23+
url: ${{ steps.deployment.outputs.page_url }}
24+
runs-on: ubuntu-latest
25+
steps:
26+
- uses: actions/checkout@v4
27+
28+
- uses: actions/setup-node@v4
29+
with:
30+
node-version: "22"
31+
cache: npm
32+
33+
- run: npm ci
34+
35+
- run: npm run build
36+
37+
- run: npm run docs
38+
39+
- uses: actions/configure-pages@v5
40+
41+
- uses: actions/upload-pages-artifact@v3
42+
with:
43+
path: api-docs/
44+
45+
- name: Deploy to GitHub Pages
46+
id: deployment
47+
uses: actions/deploy-pages@v4

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
node_modules/
22
dist/
3+
api-docs/
34
*.tsbuildinfo
45
coverage/
56
.vitest/

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,7 @@ Runnable examples in the [`examples/`](examples/) directory:
113113

114114
## Documentation
115115

116+
- 📖 [API Reference](https://opendecree.github.io/decree-typescript) -- full TypeDoc API reference
116117
- [Quick Start](docs/quickstart.md) -- install, first get/set, typed gets, error handling
117118
- [Configuration](docs/configuration.md) -- all client options, auth, TLS, retry, timeouts
118119
- [Watching](docs/watching.md) -- ConfigWatcher, WatchedField, EventEmitter, async iteration

0 commit comments

Comments
 (0)