Skip to content

Commit a1f3439

Browse files
committed
feat: typedoc, autopublish docs and package
1 parent 87b65fb commit a1f3439

File tree

6 files changed

+1039
-1146
lines changed

6 files changed

+1039
-1146
lines changed

.github/workflows/deploy-docs.yml

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

.github/workflows/publish.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: Publish package
2+
3+
on: workflow_dispatch
4+
5+
jobs:
6+
publish_package:
7+
runs-on: ubuntu-latest
8+
9+
steps:
10+
- name: Checkout
11+
uses: actions/checkout@v4
12+
with:
13+
fetch-depth: 0
14+
15+
- name: Install Node.js
16+
uses: actions/setup-node@v4
17+
with:
18+
node-version: 18
19+
registry-url: "https://registry.npmjs.org"
20+
21+
- name: Setup pnpm
22+
uses: pnpm/action-setup@v4
23+
with:
24+
version: 10
25+
run_install: true
26+
27+
- name: Build package
28+
run: pnpm build
29+
30+
- name: Publish package to NPM
31+
run: npm publish --access public
32+
env:
33+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
> [!NOTE]
1010
> Начиная с v3.0.0 поддерживается только Node.js 18.0.0+
1111
12-
| 📖 [TSDocs](https://tsdocs.dev/search/docs/kodikwrapper) | 📖 [Kodik API документация (требуется авторизация)](https://bd.kodik.biz/api/info) |
12+
| 📖 [Refs](https://thedvxchsquad.github.io/kodikwrapper) | 📖 [Kodik API документация (требуется авторизация)](https://bd.kodik.biz/api/info) |
1313
|-------------------------------------------------------------------------|-----------------------------------------------------------------------------------:|
1414

1515
## Установка

package.json

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,16 +19,18 @@
1919
},
2020
"scripts": {
2121
"build": "rm -rf ./dist && tsup",
22-
"test": "vitest"
22+
"test": "vitest",
23+
"docs": "typedoc --out docs src/index.ts --gitRevision master --skipErrorChecking"
2324
},
2425
"devDependencies": {
25-
"@stylistic/eslint-plugin": "^1.6.2",
26-
"@types/node": "^18.0.0",
27-
"@typescript-eslint/eslint-plugin": "^6.19.1",
28-
"@typescript-eslint/parser": "^6.19.1",
29-
"eslint": "^8.56.0",
26+
"@stylistic/eslint-plugin": "^5.10.0",
27+
"@types/node": "^18.19.130",
28+
"@typescript-eslint/eslint-plugin": "^8.57.1",
29+
"@typescript-eslint/parser": "^8.57.1",
30+
"eslint": "^10.1.0",
3031
"tsup": "^7.2.0",
31-
"typescript": "^5.3.3",
32+
"typedoc": "^0.28.17",
33+
"typescript": "^5.9.3",
3234
"vitest": "^0.34.6"
3335
},
3436
"keywords": [

0 commit comments

Comments
 (0)