Skip to content

Commit e98bb5b

Browse files
committed
Add: build doc github workflow
1 parent 3c493bf commit e98bb5b

File tree

2 files changed

+43
-1
lines changed

2 files changed

+43
-1
lines changed

.github/workflows/deploy-docs.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: Deploy Docs
2+
3+
on:
4+
push:
5+
branches: [ master ]
6+
7+
jobs:
8+
build:
9+
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- uses: actions/checkout@v2
14+
- name: Use Node.js 14
15+
uses: actions/setup-node@v1
16+
with:
17+
node-version: 14
18+
- name: Install Dependency
19+
run: npm ci
20+
- name: Config Internal Git
21+
run: |
22+
git config --global user.email "action@github.com"
23+
git config --global user.name "GitHub Action"
24+
- name: Clone Doc History
25+
uses: actions/checkout@v2
26+
with:
27+
ref: 'gh-pages'
28+
path: 'doc-dist'
29+
- name: Clean Doc Directory
30+
run: |
31+
cd doc-dist
32+
ls | grep -v '.git' | xargs rm -r
33+
cd ../
34+
- name: Build Docs
35+
run: npm run docs:build
36+
- name: Copy & Deploy
37+
run: |
38+
cp -r docs/.vuepress/dist/* doc-dist/
39+
cd doc-dist
40+
git add -A
41+
git commit -m 'Deploy docs'
42+
git push

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"version": "7.0.0",
44
"description": "Node.js SDK for LINE Messaging API",
55
"engines": {
6-
"node": ">=8"
6+
"node": ">=10"
77
},
88
"main": "dist/index.js",
99
"types": "dist/index.d.ts",

0 commit comments

Comments
 (0)