forked from volumio/Volumio2-UI
-
Notifications
You must be signed in to change notification settings - Fork 0
/
deploy.sh
29 lines (22 loc) · 911 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
29
#!/bin/bash
set -e # exit with nonzero exit code if anything fails
# clear and re-create the dist directory
rm -rf dist || exit 0;
mkdir dist;
# Build Volumio UI
gulp build --theme="volumio"
# go to the dist directory and create a *new* Git repo
cd dist
git init
# inside this git repo we'll pretend to be a new user
git config user.name "Volumio"
git config user.email "[email protected]"
# Deploy
git add .
git commit -m "Deploy to Dist Branch"
# Force push from the current repo's master branch to the dist branch for deployment
git push --force --quiet "https://${GH_TOKEN}@${GH_REF}" master:dist > /dev/null 2>&1
##TODO edit default IP to point to DEMO SERVER and push demo version to gh-pages
#git commit -m "Deploy DEMO Version"
# Force push from the current repo's master branch to the remote gh-page repo
#git push --force --quiet "https://${GH_TOKEN}@${GH_REF}" master:gh-pages > /dev/null 2>&1