Skip to content

Commit e984a63

Browse files
authored
chore: generate and deploy jsdoc (#15)
* chore: generate and deploy jsdoc * chore: workflow dispatch to update docs
1 parent d5682d4 commit e984a63

File tree

7 files changed

+1401
-1
lines changed

7 files changed

+1401
-1
lines changed

.github/workflows/dispatch.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: Manually update and publish documentation
2+
3+
on: workflow_dispatch
4+
5+
jobs:
6+
build-docs:
7+
runs-on: ubuntu-latest
8+
9+
steps:
10+
- uses: actions/checkout@v3
11+
- uses: actions/setup-node@v3
12+
with:
13+
node-version: 22
14+
registry-url: https://registry.npmjs.org/
15+
- run: |
16+
npm install
17+
npm run build:docs
18+
env:
19+
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
20+
- name: Upload static files as artifact
21+
id: deployment
22+
uses: actions/upload-pages-artifact@v3
23+
with:
24+
path: docs/
25+
26+
deploy-docs:
27+
environment:
28+
name: github-pages
29+
url: ${{ steps.deploy-docs.outputs.page_url }}
30+
runs-on: ubuntu-latest
31+
needs: build-docs
32+
steps:
33+
- name: Deploy to GitHub Pages
34+
id: deployment
35+
uses: actions/deploy-pages@v4

.github/workflows/publish.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,23 @@ jobs:
1818
npm install
1919
npm test
2020
npm run build
21+
npm run build:docs
2122
npm publish --access public
2223
env:
2324
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
25+
- name: Upload static files as artifact
26+
id: deployment
27+
uses: actions/upload-pages-artifact@v3
28+
with:
29+
path: docs/
30+
31+
deploy-docs:
32+
environment:
33+
name: github-pages
34+
url: ${{ steps.deploy-docs.outputs.page_url }}
35+
runs-on: ubuntu-latest
36+
needs: build
37+
steps:
38+
- name: Deploy to GitHub Pages
39+
id: deployment
40+
uses: actions/deploy-pages@v4

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
node_modules/
22
.DS_Store
33
lib/
4+
docs/

.prettierignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
lib/
2+
docs/

jsdoc.json

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"tags": {
3+
"allowUnknownTags": ["optional"]
4+
},
5+
"plugins": ["node_modules/better-docs/typescript"],
6+
"source": {
7+
"include": ["readme.md", "src"],
8+
"includePattern": "\\.(jsx|js|ts|tsx)$",
9+
"excludePattern": "(node_modules/|docs)"
10+
},
11+
"opts": {
12+
"destination": "./docs/"
13+
}
14+
}

0 commit comments

Comments
 (0)