|
| 1 | +version: 2 |
| 2 | +jobs: |
| 3 | + build: |
| 4 | + docker: |
| 5 | + # specify the version you desire here |
| 6 | + - image: circleci/node:10-browsers |
| 7 | + |
| 8 | + working_directory: ~/repo |
| 9 | + |
| 10 | + steps: |
| 11 | + - checkout |
| 12 | + |
| 13 | + # Download and cache dependencies |
| 14 | + - restore_cache: |
| 15 | + keys: |
| 16 | + - v1-dependencies-{{ checksum "package.json" }} |
| 17 | + # fallback to using the latest cache if no exact match is found |
| 18 | + - v1-dependencies- |
| 19 | + |
| 20 | + - run: |
| 21 | + name: Install dependencies |
| 22 | + command: npm ci |
| 23 | + |
| 24 | + - save_cache: |
| 25 | + paths: |
| 26 | + - node_modules |
| 27 | + key: v1-dependencies-{{ checksum "package.json" }} |
| 28 | + |
| 29 | + - run: |
| 30 | + name: build libs/core (@angular-react/core) |
| 31 | + command: npm run build:libs:core |
| 32 | + |
| 33 | + - run: |
| 34 | + name: build libs/fabric (@angular-react/fabric) |
| 35 | + command: npm run build:libs:fabric |
| 36 | + |
| 37 | + - run: |
| 38 | + name: build libs/semantic-ui (@angular-react/semantic-ui) |
| 39 | + command: npm run build:libs:semantic-ui |
| 40 | + |
| 41 | + - run: |
| 42 | + name: build apps/demo |
| 43 | + command: npm run build:demo |
| 44 | + |
| 45 | + publish-docs: |
| 46 | + docker: |
| 47 | + # specify the version you desire here |
| 48 | + - image: circleci/node:10-browsers |
| 49 | + |
| 50 | + working_directory: ~/repo |
| 51 | + |
| 52 | + steps: |
| 53 | + - checkout |
| 54 | + |
| 55 | + # Download and cache dependencies |
| 56 | + - restore_cache: |
| 57 | + keys: |
| 58 | + - v1-dependencies-{{ checksum "package.json" }} |
| 59 | + # fallback to using the latest cache if no exact match is found |
| 60 | + - v1-dependencies- |
| 61 | + |
| 62 | + - run: |
| 63 | + name: Install dependencies |
| 64 | + command: npm ci |
| 65 | + |
| 66 | + - save_cache: |
| 67 | + paths: |
| 68 | + - node_modules |
| 69 | + key: v1-dependencies-{{ checksum "package.json" }} |
| 70 | + |
| 71 | + - run: |
| 72 | + name: build docs (@angular-react/core) |
| 73 | + command: npm run build:demo:github |
| 74 | + |
| 75 | + - deploy: |
| 76 | + command: | |
| 77 | + if [ "${CIRCLE_BRANCH}" == "master" ]; then |
| 78 | + git add -A && git commit -m 'Deploy to GitHub pages [ci]' && git push |
| 79 | + fi |
| 80 | +workflows: |
| 81 | + version: 2 |
| 82 | + build_and_publish-docs: |
| 83 | + jobs: |
| 84 | + - build |
| 85 | + - publish-docs: |
| 86 | + requires: |
| 87 | + - build |
| 88 | + filters: |
| 89 | + branches: |
| 90 | + only: master |
0 commit comments