Skip to content

Commit bd016f2

Browse files
committed
ADD docs scripts
1 parent eca86fb commit bd016f2

File tree

4 files changed

+18
-13
lines changed

4 files changed

+18
-13
lines changed

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ before_install: ./scripts/travis/before_install.sh
1111
after_success: ./scripts/travis/after_success.sh
1212
script:
1313
- npm run bootstrap
14-
- lerna exec --scope test-cra -- npm i
14+
- npm run bootstrap:test-cra
1515
- npm run lint
1616
- npm run test -- --coverage
1717
- npm run coverage

docs/package.json

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -44,11 +44,10 @@
4444
"main": "n/a",
4545
"scripts": {
4646
"build-storybook": "build-storybook",
47-
"build": "gatsby build && cp static/* .travis.yml ./public",
48-
"deploy": "gh-pages -t -r [email protected]:storybooks/storybooks.github.io.git -d public -o origin -b master",
49-
"deploy-travis": "gh-pages -t -r https://${GH_TOKEN}@github.com/storybooks/storybooks.github.io.git -d public -o origin -b master",
50-
"develop": "gatsby develop",
51-
"storybook": "start-storybook -p 9009 -s pages",
52-
"lint": "remark . # -- -o to update"
47+
"build": "gatsby build && cp static/* .travis.yml ./dist",
48+
"deploy:manual": "gh-pages -t -r [email protected]:storybooks/storybook.git -d dist -o origin -b gh-pages-test",
49+
"deploy:ci": "gh-pages -t -r https://${GH_TOKEN}@github.com/storybooks/storybook.git -d dist -o origin -b gh-pages-test",
50+
"dev": "gatsby develop",
51+
"storybook": "start-storybook -p 9009 -s pages"
5352
}
5453
}

package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,10 +49,10 @@
4949
"test": "jest",
5050
"test:watch": "npm test -- --watch",
5151
"coverage": "codecov",
52-
"build:docs": "cd docs && gatsby build && cp static/* .travis.yml ./public",
53-
"deploy": "#gh-pages -t -r [email protected]:storybooks/storybook.git -d public -o origin -b docs",
54-
"deploy-travis": "#gh-pages -t -r https://${GH_TOKEN}@github.com/storybooks/storybook.git -d public -o origin -b docs",
55-
"dev:docs": "gatsby develop"
52+
"docs:build": "cd docs && npm run build",
53+
"docs:deploy:manual": "cd docs && npm run deploy:manual",
54+
"docs:deploy:ci": "cd docs && npm run deploy:ci",
55+
"docs:dev": "cd docs && npm run dev"
5656
},
5757
"collective": {
5858
"type": "opencollective",

scripts/travis/after_success.sh

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,17 @@
11
#!/bin/bash
22
set -e
33

4-
if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then
4+
if [ "$TRAVIS_PULL_REQUEST" != 'false' ]; then
55
echo "We are in a pull request, not releasing"
66
exit 0
77
fi
88

99
if [[ $TRAVIS_BRANCH == 'master' ]]; then
10-
# npm run semantic-release
10+
# setup git user
11+
git config --global user.email "[email protected]"
12+
git config --global user.name "Travis CI"
13+
14+
# deploy documentation to github-pages
15+
npm run docs:build
16+
npm run docs:deploy:ci
1117
fi

0 commit comments

Comments
 (0)