@pikokr/command.ts 4.0.2-dev.6d75eff → 4.0.2-dev.c1a6596
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/workflows/docs.yml +79 -0
- package/docs/index.yml +5 -0
- package/package.json +5 -3
- package/scripts/docs.ts +11 -0
- package/tsconfig.json +1 -1
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
name: Documentation
|
|
2
|
+
on:
|
|
3
|
+
push:
|
|
4
|
+
branches:
|
|
5
|
+
- 'dev'
|
|
6
|
+
- 'master'
|
|
7
|
+
- '!docs'
|
|
8
|
+
tags:
|
|
9
|
+
- '*'
|
|
10
|
+
jobs:
|
|
11
|
+
build:
|
|
12
|
+
name: Build documentation
|
|
13
|
+
runs-on: ubuntu-latest
|
|
14
|
+
outputs:
|
|
15
|
+
BRANCH_NAME: ${{ steps.env.outputs.BRANCH_NAME }}
|
|
16
|
+
BRANCH_OR_TAG: ${{ steps.env.outputs.BRANCH_OR_TAG }}
|
|
17
|
+
SHA: ${{ steps.env.outputs.SHA }}
|
|
18
|
+
if: github.repository_owner == 'pikokr'
|
|
19
|
+
steps:
|
|
20
|
+
- name: Checkout repository
|
|
21
|
+
uses: actions/checkout@v2
|
|
22
|
+
|
|
23
|
+
- name: Install node.js v16
|
|
24
|
+
uses: actions/setup-node@v2
|
|
25
|
+
with:
|
|
26
|
+
node-version: 16
|
|
27
|
+
cache: 'yarn'
|
|
28
|
+
cache-dependency-path: yarn.lock
|
|
29
|
+
- name: Install dependencies
|
|
30
|
+
run: yarn --immutable
|
|
31
|
+
|
|
32
|
+
- name: Build docs
|
|
33
|
+
run: yarn docs
|
|
34
|
+
|
|
35
|
+
- name: Upload artifacts
|
|
36
|
+
uses: actions/upload-artifact@v2
|
|
37
|
+
with:
|
|
38
|
+
name: docs
|
|
39
|
+
path: docs/docs.json
|
|
40
|
+
- name: Set outputs for upload job
|
|
41
|
+
id: env
|
|
42
|
+
run: |
|
|
43
|
+
echo "::set-output name=BRANCH_NAME::${GITHUB_REF_NAME}"
|
|
44
|
+
echo "::set-output name=BRANCH_OR_TAG::${GITHUB_REF_TYPE}"
|
|
45
|
+
echo "::set-output name=SHA::${GITHUB_SHA}"
|
|
46
|
+
upload:
|
|
47
|
+
name: Upload Documentation
|
|
48
|
+
needs: build
|
|
49
|
+
runs-on: ubuntu-latest
|
|
50
|
+
env:
|
|
51
|
+
BRANCH_NAME: ${{ needs.build.outputs.BRANCH_NAME }}
|
|
52
|
+
BRANCH_OR_TAG: ${{ needs.build.outputs.BRANCH_OR_TAG }}
|
|
53
|
+
SHA: ${{ needs.build.outputs.SHA }}
|
|
54
|
+
steps:
|
|
55
|
+
- name: Download artifacts
|
|
56
|
+
uses: actions/download-artifact@v2
|
|
57
|
+
with:
|
|
58
|
+
name: docs
|
|
59
|
+
path: docs
|
|
60
|
+
|
|
61
|
+
- name: Checkout docs repository
|
|
62
|
+
uses: actions/checkout@v2
|
|
63
|
+
with:
|
|
64
|
+
repository: 'pikokr/docs'
|
|
65
|
+
token: ${{ secrets.PIKOKR_DOCS }}
|
|
66
|
+
path: 'out'
|
|
67
|
+
|
|
68
|
+
- name: Move docs to correct directory
|
|
69
|
+
run: |
|
|
70
|
+
mkdir -p out/command.ts
|
|
71
|
+
mv docs/docs.json out/command.ts/${BRANCH_NAME}.json
|
|
72
|
+
- name: Commit and push
|
|
73
|
+
run: |
|
|
74
|
+
cd out
|
|
75
|
+
git config user.name github-actions[bot]
|
|
76
|
+
git config user.email 41898282+github-actions[bot]@users.noreply.github.com
|
|
77
|
+
git add .
|
|
78
|
+
git commit -m "Docs build for ${BRANCH_OR_TAG} ${BRANCH_NAME}: ${SHA}" || true
|
|
79
|
+
git push
|
package/docs/index.yml
ADDED
package/package.json
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pikokr/command.ts",
|
|
3
3
|
"description": "Discord.js command framework for typescript.",
|
|
4
|
-
"version": "4.0.2-dev.
|
|
4
|
+
"version": "4.0.2-dev.c1a6596",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
7
7
|
"license": "MIT",
|
|
8
8
|
"devDependencies": {
|
|
9
|
+
"@discordjs/ts-docgen": "^0.3.4",
|
|
9
10
|
"@swc/core": "^1.2.135",
|
|
10
11
|
"@types/lodash": "^4.14.172",
|
|
11
12
|
"all-contributors-cli": "^6.20.0",
|
|
@@ -13,7 +14,7 @@
|
|
|
13
14
|
"prettier": "^2.2.1",
|
|
14
15
|
"ts-node": "^10.1.0",
|
|
15
16
|
"tsup": "^5.11.12",
|
|
16
|
-
"typedoc": "^0.
|
|
17
|
+
"typedoc": "^0.22.11"
|
|
17
18
|
},
|
|
18
19
|
"dependencies": {
|
|
19
20
|
"@types/node": "^14.14.37",
|
|
@@ -32,6 +33,7 @@
|
|
|
32
33
|
"prepack": "yarn build",
|
|
33
34
|
"build": "tsup-node",
|
|
34
35
|
"docs:dev": "typedoc",
|
|
35
|
-
"docs:build": "typedoc"
|
|
36
|
+
"docs:build": "typedoc",
|
|
37
|
+
"docs": "typedoc --json docs/typedoc-out.json src/index.ts && ts-node scripts/docs"
|
|
36
38
|
}
|
|
37
39
|
}
|
package/scripts/docs.ts
ADDED
package/tsconfig.json
CHANGED