File tree 3 files changed +23
-10
lines changed
3 files changed +23
-10
lines changed Original file line number Diff line number Diff line change 1
1
language : node_js
2
2
node_js : 6
3
3
4
- branches :
5
- only : source
6
-
7
- after_success : ./resources/publish.sh
8
-
9
4
env :
10
5
global :
11
6
- secure : " HisahnzlpVlTi239Z80UtqRWYEWUBXyVDYsxX9vxwg332jSxO7Hr6TFmNjghpJPtT/HRjQ/FQ4Cfain2ae2OBi0a1mBNNvOTrfy8/Rvs+FwxlmPolzXKZg1PLx1A9HMlhVkAxYuk5AKv5wLNN3xWzPS9xcHASiCgHE1imq9tuf53tuflNpoAlRT6WVYqxuLluDTbfiTrmjjydfh/iTkYyU7mdfowEyS7+b7ltx8tzGD5Fif1dKBVZEkImxC5KV3oczk5zxIBC/j0SEmd4KLl5NH/kbUcD/mFSgtoKRSW0QwJdwR0I3AurP/D8FlTzVyCwwxMrZfnWjoync1bMJvRbz02KkiICt2lfI0BFo1dDD1yO8lYOhSHcXZRhhEypLu9mho2Cy0zy5zF5PF5t2X8zfGgkQ5eTy6xYCHOAl4eqO9NU2mtpKLdYpXfkBLRTa2e5U+DBqYt8fVXyBR2qVCbpIkg96Hx/FCCKtNlzjyhyTJmyoZr7BxPpHQZkmroieEMfpM7VfF729npf0n6jrfBLwyWFjCFAG9xLey537sUdczEltdWgOuW1rs0KaP4uM1si3S+fNndXLDX70n8BsadnJgq0y1RWAH1y8Y+Pa5cRl0QXQOJUgK4ZcS29+BzZ6RIsFUrAJXHCRdaTDrQNw8CepW443Ke9quwG8IJLCAPV0c="
7
+
8
+ deploy :
9
+ skip_cleanup : true
10
+ provider : script
11
+ script : ./resources/publish.sh
12
+ on :
13
+ branch : source
Original file line number Diff line number Diff line change 6
6
"start" : " rm -rf build && babel-node resources/server.js" ,
7
7
"build" : " rm -rf build && babel-node resources/build.js" ,
8
8
"watch" : " rm -rf build && babel-node resources/watch.js" ,
9
- "test" : " exit 0 "
9
+ "test" : " npm run build "
10
10
},
11
11
"babel" : {
12
12
"optional" : [
Original file line number Diff line number Diff line change 1
- #! /bin/bash
1
+ #! /bin/bash -e
2
2
3
- set -e
3
+ # Publishing to NPM is currently supported by Travis CI, which ensures that all
4
+ # tests pass first and the deployed module contains the correct file struture.
5
+ # In order to prevent inadvertently circumventing this, we ensure that a CI
6
+ # environment exists before continuing.
7
+ if [ " $CI " != true ]; then
8
+ echo " \n\n\n \033[101;30m Only Travis CI can publish to NPM. \033[0m\n\n\n" 1>&2 ;
9
+ exit 1;
10
+ fi ;
4
11
5
- # Build the website and copy it to the build folder
6
- npm run build
12
+
13
+ # Ensure the website was built
14
+ if [ ! -f ./build/index.html ]; then
15
+ echo " \n\n\n \033[101;30m Something went wrong, the site does not exist. \033[0m\n\n\n" 1>&2 ;
16
+ exit 1;
17
+ fi
7
18
8
19
# Commit the website and push it
9
20
cd build
You can’t perform that action at this time.
0 commit comments