Skip to content

Commit cd6a49d

Browse files
committed
doc: add github page deploy sh
1 parent 3b092c4 commit cd6a49d

File tree

3 files changed

+29
-0
lines changed

3 files changed

+29
-0
lines changed

CNAME

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
doc.darukjs.com

deployDoc.sh

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
#!/usr/bin/env sh
2+
3+
# abort on errors
4+
set -e
5+
6+
# build
7+
npm run doc
8+
9+
# navigate into the build output directory
10+
cp CNAME docs/
11+
cd docs/
12+
13+
# if you are deploying to a custom domain
14+
# echo 'www.example.com' > CNAME
15+
16+
git init
17+
git add -A
18+
git commit -m 'deploy doc'
19+
20+
# if you are deploying to https://<USERNAME>.github.io
21+
# git push -f [email protected]:<USERNAME>/<USERNAME>.github.io.git master
22+
23+
# if you are deploying to https://<USERNAME>.github.io/<REPO>
24+
# git push -f https://github.com/Youjingyu/clinic-doc-zh.git master:gh-pages
25+
git push -f [email protected]:darukjs/daruk.git master:gh-pages
26+
27+
cd -

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
"main": "build/index.js",
66
"scripts": {
77
"doc": "typedoc",
8+
"deploydoc": "./deployDoc.sh",
89
"contributors:add": "all-contributors add",
910
"contributors:generate": "all-contributors generate",
1011
"dev": "ts-node --project tsconfig.json --files src/index.ts",

0 commit comments

Comments
 (0)