Skip to content

Commit f22acd0

Browse files
committed
Deploy examples from CircleCI.
1 parent 9fd4b00 commit f22acd0

File tree

3 files changed

+38
-5
lines changed

3 files changed

+38
-5
lines changed

.circleci/config.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,12 @@ jobs:
7979
- run:
8080
name: Test examples
8181
command: yarn test:examples
82+
- run:
83+
name: Deploy examples
84+
command: |
85+
if [ "${CIRCLE_BRANCH}" == "master" ]; then
86+
yarn deploy:examples --token $NOW_API_TOKEN
87+
fi
8288
8389
workflows:
8490
version: 2

package.json

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@
1212
"scripts": {
1313
"bootstrap": "yarn workspaces run install",
1414
"clean": "lerna clean",
15+
"start": "run-p start:*",
16+
"start:examples": "now dev",
17+
"start:storybook": "start-storybook -p 6006",
1518
"lint": "eslint packages/*/src/*.js",
1619
"test": "jest packages/*/src/*.spec.js",
1720
"test:watch": "yarn test -- --watch",
@@ -25,12 +28,10 @@
2528
"ci": "yarn lint && yarn test:compat && yarn test:examples",
2629
"build:packages": "lerna run --scope 'react-async*' build",
2730
"build:examples": "lerna run --scope '*-example' build",
31+
"build:storybook": "build-storybook -o docs",
32+
"deploy:examples": "now",
2833
"bump": "lerna version -m 'Bump' --no-git-tag-version --no-push",
29-
"postbump": "yarn build:packages",
30-
"dev": "now dev",
31-
"deploy": "now",
32-
"storybook": "start-storybook -p 6006",
33-
"build-storybook": "build-storybook -o docs"
34+
"postbump": "yarn build:packages"
3435
},
3536
"devDependencies": {
3637
"@babel/core": "^7.4.5",
@@ -63,6 +64,7 @@
6364
"jest-dom": "^3.5.0",
6465
"lerna": "^3.15.0",
6566
"now": "^15.8.7",
67+
"npm-run-all": "^4.1.5",
6668
"prettier": "1.17.0",
6769
"prop-types": "^15.7.2",
6870
"react": "^16.8.6",

yarn.lock

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11493,6 +11493,11 @@ memory-fs@^0.4.0, memory-fs@^0.4.1, memory-fs@~0.4.1:
1149311493
errno "^0.1.3"
1149411494
readable-stream "^2.0.1"
1149511495

11496+
memorystream@^0.3.1:
11497+
version "0.3.1"
11498+
resolved "https://registry.yarnpkg.com/memorystream/-/memorystream-0.3.1.tgz#86d7090b30ce455d63fbae12dda51a47ddcaf9b2"
11499+
integrity sha1-htcJCzDORV1j+64S3aUaR93K+bI=
11500+
1149611501
meow@^3.3.0:
1149711502
version "3.7.0"
1149811503
resolved "https://registry.yarnpkg.com/meow/-/meow-3.7.0.tgz#72cb668b425228290abbfa856892587308a801fb"
@@ -12528,6 +12533,21 @@ npm-pick-manifest@^2.2.3:
1252812533
npm-package-arg "^6.0.0"
1252912534
semver "^5.4.1"
1253012535

12536+
npm-run-all@^4.1.5:
12537+
version "4.1.5"
12538+
resolved "https://registry.yarnpkg.com/npm-run-all/-/npm-run-all-4.1.5.tgz#04476202a15ee0e2e214080861bff12a51d98fba"
12539+
integrity sha512-Oo82gJDAVcaMdi3nuoKFavkIHBRVqQ1qvMb+9LHk/cF4P6B2m8aP04hGf7oL6wZ9BuGwX1onlLhpuoofSyoQDQ==
12540+
dependencies:
12541+
ansi-styles "^3.2.1"
12542+
chalk "^2.4.1"
12543+
cross-spawn "^6.0.5"
12544+
memorystream "^0.3.1"
12545+
minimatch "^3.0.4"
12546+
pidtree "^0.3.0"
12547+
read-pkg "^3.0.0"
12548+
shell-quote "^1.6.1"
12549+
string.prototype.padend "^3.0.0"
12550+
1253112551
npm-run-path@^2.0.0:
1253212552
version "2.0.2"
1253312553
resolved "https://registry.yarnpkg.com/npm-run-path/-/npm-run-path-2.0.2.tgz#35a9232dfa35d7067b4cb2ddf2357b1871536c5f"
@@ -13290,6 +13310,11 @@ physical-cpu-count@^2.0.0:
1329013310
resolved "https://registry.yarnpkg.com/physical-cpu-count/-/physical-cpu-count-2.0.0.tgz#18de2f97e4bf7a9551ad7511942b5496f7aba660"
1329113311
integrity sha1-GN4vl+S/epVRrXURlCtUlverpmA=
1329213312

13313+
pidtree@^0.3.0:
13314+
version "0.3.0"
13315+
resolved "https://registry.yarnpkg.com/pidtree/-/pidtree-0.3.0.tgz#f6fada10fccc9f99bf50e90d0b23d72c9ebc2e6b"
13316+
integrity sha512-9CT4NFlDcosssyg8KVFltgokyKZIFjoBxw8CTGy+5F38Y1eQWrt8tRayiUOXE+zVKQnYu5BR8JjCtvK3BcnBhg==
13317+
1329313318
pify@^2.0.0, pify@^2.3.0:
1329413319
version "2.3.0"
1329513320
resolved "https://registry.yarnpkg.com/pify/-/pify-2.3.0.tgz#ed141a6ac043a849ea588498e7dca8b15330e90c"

0 commit comments

Comments
 (0)