Skip to content

Commit

Permalink
ADD docs scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
ndelangen committed May 26, 2017
1 parent eca86fb commit bd016f2
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 13 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ before_install: ./scripts/travis/before_install.sh
after_success: ./scripts/travis/after_success.sh
script:
- npm run bootstrap
- lerna exec --scope test-cra -- npm i
- npm run bootstrap:test-cra
- npm run lint
- npm run test -- --coverage
- npm run coverage
Expand Down
11 changes: 5 additions & 6 deletions docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,10 @@
"main": "n/a",
"scripts": {
"build-storybook": "build-storybook",
"build": "gatsby build && cp static/* .travis.yml ./public",
"deploy": "gh-pages -t -r [email protected]:storybooks/storybooks.github.io.git -d public -o origin -b master",
"deploy-travis": "gh-pages -t -r https://${GH_TOKEN}@github.com/storybooks/storybooks.github.io.git -d public -o origin -b master",
"develop": "gatsby develop",
"storybook": "start-storybook -p 9009 -s pages",
"lint": "remark . # -- -o to update"
"build": "gatsby build && cp static/* .travis.yml ./dist",
"deploy:manual": "gh-pages -t -r [email protected]:storybooks/storybook.git -d dist -o origin -b gh-pages-test",
"deploy:ci": "gh-pages -t -r https://${GH_TOKEN}@github.com/storybooks/storybook.git -d dist -o origin -b gh-pages-test",
"dev": "gatsby develop",
"storybook": "start-storybook -p 9009 -s pages"
}
}
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,10 @@
"test": "jest",
"test:watch": "npm test -- --watch",
"coverage": "codecov",
"build:docs": "cd docs && gatsby build && cp static/* .travis.yml ./public",
"deploy": "#gh-pages -t -r [email protected]:storybooks/storybook.git -d public -o origin -b docs",
"deploy-travis": "#gh-pages -t -r https://${GH_TOKEN}@github.com/storybooks/storybook.git -d public -o origin -b docs",
"dev:docs": "gatsby develop"
"docs:build": "cd docs && npm run build",
"docs:deploy:manual": "cd docs && npm run deploy:manual",
"docs:deploy:ci": "cd docs && npm run deploy:ci",
"docs:dev": "cd docs && npm run dev"
},
"collective": {
"type": "opencollective",
Expand Down
10 changes: 8 additions & 2 deletions scripts/travis/after_success.sh
Original file line number Diff line number Diff line change
@@ -1,11 +1,17 @@
#!/bin/bash
set -e

if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then
if [ "$TRAVIS_PULL_REQUEST" != 'false' ]; then
echo "We are in a pull request, not releasing"
exit 0
fi

if [[ $TRAVIS_BRANCH == 'master' ]]; then
# npm run semantic-release
# setup git user
git config --global user.email "[email protected]"
git config --global user.name "Travis CI"

# deploy documentation to github-pages
npm run docs:build
npm run docs:deploy:ci
fi

0 comments on commit bd016f2

Please sign in to comment.