Skip to content

Commit

Permalink
fix(cd): update travis config and deploy script
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinchappell committed Nov 6, 2018
1 parent a42ba0b commit ac03283
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 12 deletions.
11 changes: 5 additions & 6 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,11 @@ cache:
- node_modules
notifications:
email: false
git:
submodules: false
before_install:
- echo "https://${GH_TOKEN}:@github.com" > .git/credentials
- git config credential.helper "store --file=.git/credentials"
- git config --global user.email "[email protected]"
- "git config --global user.name \"\U0001F916\""
jobs:
include:
- stage: lint
Expand All @@ -23,10 +26,6 @@ jobs:
- stage: deploy
if: branch = master
before_deploy:
- echo "https://${GH_TOKEN}:@github.com" > .git/credentials
- git config credential.helper "store --file=.git/credentials"
- git config --global user.email "[email protected]"
- "git config --global user.name \"\U0001F916\""
- sudo apt-get update
- sudo apt-get -y install python3-pip python-dev
- sudo pip3 install --upgrade setuptools
Expand Down
11 changes: 5 additions & 6 deletions tools/deploy.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,13 @@ const onFinish = (err, cb) => {
console.error(err);
return process.exit(1);
}
}
};

// const deploySiteCommands = ['git submodule update --init --recursive', 'yarn docs', 'cd site', 'yarn deploy', 'cd ../'];
const deploySiteCommands = ['yarn docs', 'cd site/', 'yarn deploy', 'cd ../']

// Deploy the demo and site.
exec('git push origin $(git subtree split --prefix demo $(git rev-parse --abbrev-ref HEAD)):gh-pages --force', err =>
onFinish(err, () => {
console.log('Demo successfully deployed');
// return exec(deploySiteCommands.join(' && '), err => onFinish(err, () => console.log('Site successfully deployed')))
})
onFinish(err, () => console.log('Demo successfully deployed'))
);

exec(deploySiteCommands.join(' && '), err => onFinish(err, () => console.log('Site successfully deployed')));

0 comments on commit ac03283

Please sign in to comment.