forked from GrapesJS/grapesjs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
deploy.sh
executable file
·28 lines (21 loc) · 701 Bytes
/
deploy.sh
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
#!/usr/bin/env sh
# abort on errors
set -e
# build
# npm run docs:build
# navigate into the build output directory
cd docs/.vuepress/dist
# I need to deploy all the documentation inside docs folder
mkdir docs-new
# move all the files from the current directory in docs
mv `\ls -1 ./ | grep -v docs-new` ./docs-new
# fetch the current site, remove the old docs dir and make current the new one
git clone -b gh-pages https://github.com/GrapesJS/grapesjs.git tmp && mv tmp/* tmp/.* . && rm -rf tmp
rm -fR docs
mv ./docs-new ./docs
# stage all and commit
git add -A
git commit -m 'deploy docs'
git push https://[email protected]/GrapesJS/grapesjs.git gh-pages
# surge --domain grapesjs.surge.sh
cd -