Skip to content

Commit 8d4e7e0

Browse files
author
James Hagborg
committed
fix some directory changing stuff and fail if the script fails on any part
1 parent 29faf96 commit 8d4e7e0

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

scripts/deploy_docs.sh

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,24 @@
11
#!/bin/bash
22

3+
# Exit the script if something messes up, so we don't accidentally the whole thing
4+
set -e
5+
36
DEPLOY_DIR=$1
47

58
echo "Deploying docs to ${DEPLOY_DIR}"
69

710
echo "Pulling existing github pages..."
811
# Set up git
9-
cd $HOME
10-
echo "debug: cwd is $(pwd)"
12+
1113
git config --global user.email "[email protected]"
1214
git config --global user.name "travis-ci"
15+
16+
mkdir $HOME/gh-pages
17+
cd $HOME/gh-pages
18+
echo "debug: cwd is $(pwd)"
1319
git init
1420
git pull "https://${GH_TOKEN}@github.com/teamhyper/hyperLib.git" gh-pages &> /dev/null
1521
ls -la
16-
cd gh-pages
17-
echo "debug: cwd is now $(pwd)"
18-
ls -la
1922
git status
2023
git branch
2124

0 commit comments

Comments
 (0)