Skip to content
Permalink
Browse files

docs(website): Configure website autodeploy

  • Loading branch information...
MichalLytek committed Apr 5, 2018
1 parent c7cb298 commit b7e377164559d2cbdb8734d1d7230d16a0b47f5e
Showing with 43 additions and 16 deletions.
  1. +31 −16 .travis.yml
  2. +12 −0 publish-website.sh
@@ -1,16 +1,31 @@
language: node_js
node_js:
- stable
- 8
- 6
before_install:
- npm i -g codecov
script:
- npm run verify
- npm run test:ci
after_success:
- codecov
notifications:
email:
on_success: never
on_failure: always
jobs:
include:
- stage: test
language: node_js
node_js:
- stable
- 8
- 6
before_install:
- npm i -g codecov
script:
- npm run verify
- npm run test:ci
after_success:
- codecov
notifications:
email:
on_success: never
on_failure: always
- stage: deploy
language: node_js
node_js: 8
install: true
before_script:
- chmod +x publish-website.sh
script:
- ./publish-website.sh
notifications:
email:
on_success: never
on_failure: always
@@ -0,0 +1,12 @@
#!/bin/bash -e

if [ "$TRAVIS_PULL_REQUEST" = "false" ] && [ "$TRAVIS_BRANCH" = "master" ]; then
git config user.email "$GIT_USER@users.noreply.github.com"
git config user.name "Travis"
echo "machine github.com login $GIT_USER password $GIT_TOKEN" > ~/.netrc

cd website
npm install
GIT_USER=$GIT_USER CURRENT_BRANCH=master npm run publish-gh-pages
exit 0;
fi

0 comments on commit b7e3771

Please sign in to comment.
You can’t perform that action at this time.