forked from Teleopti/styleguide
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdeploy-ghpages.sh
More file actions
48 lines (36 loc) · 1.19 KB
/
Copy pathdeploy-ghpages.sh
File metadata and controls
48 lines (36 loc) · 1.19 KB
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
47
48
( git clone -b gh-pages --single-branch https://github.com/Teleopti/styleguide.git out
cd out
find . -path ./.git -prune -o -exec rm -rf {} \; 2> /dev/null
git config user.name "Travis-CI"
git config user.email "carl.rockman@teleopti.com"
rm -rf ../css;
rm -rf ../directives
rm -rf ../fonts
rm -rf ../kss-template
rm -rf ../vendor
cp -R ../styleguide ./
rm -rf ../styleguide
git add . -A
if test -n "$(git status --porcelain)"; then
# Uncommitted changes
git commit -m "Deployed to Github Pages"
git push --force --quiet "https://${GH_TOKEN}@${GH_REF}" gh-pages > /dev/null 2>&1
# Create version package and publish to Release
cp ../.npmignore ./.npmignore
cp ../package.json ./package.json
rm -rf ./node_modules
npm pack
cd ..
git clone -b Release --single-branch https://github.com/Teleopti/styleguide.git Release
cp -n out/*.tgz Release
cd Release
git add .
if test -n "$(git status --porcelain)"; then
# Uncommitted changes
git config user.name "Travis-CI"
git config user.email "carl.rockman@teleopti.com"
git commit -m "Deployed to Release archive"
git push --force --quiet "https://${GH_TOKEN}@${GH_REF}" Release > /dev/null 2>&1
fi
fi
)