Skip to content

Commit 775663f

Browse files
author
Pooya Parsa
committed
automate publish tasks
1 parent 1adfb3a commit 775663f

File tree

2 files changed

+4
-9
lines changed

2 files changed

+4
-9
lines changed

build/gh-pages

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
#!/usr/bin/env bash
22
set -x -e
3-
cd ..
43

54
# Ensure clean dist dir
65
[ -d docs-dist ] && rm -frv docs-dist
@@ -9,10 +8,6 @@ mkdir -p docs-dist
98
# Gen docs
109
yarn docs-gen
1110

12-
# Prepare git
13-
# git config --global user.email "pooya@pi0.ir"
14-
# git config --global user.name "bootstrap-vue-bot"
15-
1611
# Fetch gh-pages
1712
cd docs-dist
1813
git init
@@ -21,6 +16,5 @@ git fetch origin
2116

2217
# Commit new docs
2318
git add --all
24-
#git commit -m "Published by CI"
2519
git commit -m "Update Docs"
2620
git push -ff origin master

package.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,10 @@
5151
"watch:extra": "rollup -c build/rollup.extra.config.js --watch",
5252
"docs-dev": "nuxt dev",
5353
"docs-gen": "nuxt generate",
54-
"docs-build": "nuxt build",
55-
"test:jest": "jest",
56-
"test": "npm run test:jest"
54+
"docs-publish": "./build/gh-pages",
55+
"test": "jest",
56+
"prepublish": "npm run build && npm run test",
57+
"postpublish": "npm run docs-publish"
5758
},
5859
"dependencies": {
5960
"bootstrap": "^4.0.0-alpha.6",

0 commit comments

Comments
 (0)