Skip to content

Commit

Permalink
wrap in a try catch
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinchappell committed Feb 1, 2020
1 parent 2c81e41 commit 891c589
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ jobs:
after_deploy:
- git clone --depth 1 --single-branch --branch "$DEMO_BRANCH" "https://${GH_TOKEN}:@github.com/${DEMO_REPO}" "$DEMO_BRANCH"
- git clone --depth 1 "https://${GH_TOKEN}:@github.com/${SITE_REPO}" "$SITE_DIR" 2> /dev/null || (cd "$SITE_DIR" ; git pull; cd ../)
- npm run build:all
- ls -l
- npm run deploy:all
env:
global:
Expand Down
8 changes: 6 additions & 2 deletions tools/deploy.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,9 @@ const commands = [
'rm -rf gh-pages/ demo/',
]

// Deploy the demo and site.
exec(commands.join(' && '), err => onFinish(err, () => console.log('Demo successfully deployed')))
// try to deploy the demo
try {
exec(commands.join(' && '), err => onFinish(err, () => console.log('Demo successfully deployed')))
} catch (e) {
console.error(e)
}

0 comments on commit 891c589

Please sign in to comment.