diff --git a/.travis.yml b/.travis.yml index 123c8ee91..9ecfb80a9 100644 --- a/.travis.yml +++ b/.travis.yml @@ -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: diff --git a/tools/deploy.js b/tools/deploy.js index 1f3e0e3b0..1c171e10d 100644 --- a/tools/deploy.js +++ b/tools/deploy.js @@ -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) +}