Skip to content

Commit 6382f08

Browse files
committed
Added caching to circle ci config
1 parent b0bfece commit 6382f08

File tree

2 files changed

+22
-2
lines changed

2 files changed

+22
-2
lines changed

.circleci/config.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,17 @@ jobs:
3838
command: |
3939
echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > ~/react-forms/.npmrc
4040
yarn release
41+
predeploy:
42+
working_directory: ~/react-forms
43+
docker:
44+
- image: circleci/node:10
45+
steps:
46+
- attach_workspace:
47+
at: ~/react-forms
48+
- run:
49+
name: Predeploy demo
50+
command: |
51+
yarn --cwd packages/react-renderer-demo/ predeploy
4152
deploy:
4253
working_directory: ~/react-forms
4354
docker:
@@ -53,12 +64,20 @@ jobs:
5364
name: Deploy demo
5465
command: |
5566
yarn --cwd packages/react-renderer-demo/ deploy --token=$FIREBASE_TOKEN
67+
- save_cache:
68+
key: dependency-cache-{{ checksum "yarn.lock" }}
69+
paths:
70+
- ~/react-forms/node_modules
71+
- ~/react-forms/packages/react-renderer-demo/dist/functions/next/cache
5672

5773
workflows:
5874
version: 2
5975
build_and_deploy:
6076
jobs:
6177
- build
78+
- predeploy:
79+
requires:
80+
- build
6281
- release:
6382
requires:
6483
- build
@@ -68,6 +87,7 @@ workflows:
6887
- deploy:
6988
requires:
7089
- build
90+
- predeploy
7191
filters:
7292
branches:
7393
only: master

packages/react-renderer-demo/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
"@material-ui/styles": "^4.5.2",
3030
"@mdx-js/loader": "^1.4.5",
3131
"@mdx-js/react": "^1.4.5",
32-
"@next/mdx": "^9.0.5",
32+
"@next/mdx": "^9.1.2",
3333
"@patternfly/patternfly-next": "^1.0.175",
3434
"@patternfly/react-core": "~3.16.10",
3535
"@patternfly/react-tokens": "^2.5.1",
@@ -38,7 +38,7 @@
3838
"firebase-admin": "^8.5.0",
3939
"firebase-functions": "^2.1.0",
4040
"grpc": "^1.22.2",
41-
"next": "^9.0.5",
41+
"next": "9.1.2",
4242
"patternfly-react": "^2.25.1",
4343
"prop-types": "^15.6.2",
4444
"raw-loader": "^3.1.0",

0 commit comments

Comments
 (0)