forked from nklayman/vue-cli-plugin-electron-builder
-
Notifications
You must be signed in to change notification settings - Fork 1
/
deployDocs.js
46 lines (42 loc) · 857 Bytes
/
deployDocs.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
const execa = require('execa')
const List = require('terminal-tasks')
const list = new List([
'Build With Vuepress',
'Git Init',
'Git Add',
'Git Commit',
'Git Push'
])
const deploy = async () => {
// Build docs
await execa('yarn', ['docs:build'], {})
list.next()
// Push to github
await execa('git', ['init'], {
cwd: './docs/.vuepress/dist'
})
list.next()
await execa('git', ['add', '-A'], {
cwd: './docs/.vuepress/dist'
})
list.next()
await execa('git', ['commit', '-m', 'deploy'], {
cwd: './docs/.vuepress/dist'
})
list.next()
await execa(
'git',
[
'push',
'-f',
'https://github.com/nklayman/vue-cli-plugin-electron-builder.git',
'master:gh-pages'
],
{
cwd: './docs/.vuepress/dist'
}
)
}
deploy().then(() => {
list.complete('Deploy Complete!')
})