circle.yml 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. version: 2
  2. jobs:
  3. build:
  4. working_directory: ~/ionic/
  5. docker:
  6. - image: node:7
  7. branches:
  8. ignore:
  9. - mono-refactor
  10. - core
  11. steps:
  12. - checkout
  13. - restore_cache:
  14. key: ionic-site
  15. - run:
  16. name: Prepare ionic-site repo
  17. command: ./scripts/docs/prepare.sh
  18. - save_cache:
  19. key: ionic-site
  20. paths:
  21. - ~/ionic-site/
  22. - restore_cache:
  23. key: node_modules_{{ checksum "package.json" }}
  24. - run:
  25. name: Install node modules
  26. command: npm i
  27. - save_cache:
  28. key: node_modules_{{ checksum "package.json" }}
  29. paths:
  30. - ~/ionic/node_modules/
  31. - run:
  32. name: Run tslint
  33. command: ./node_modules/.bin/gulp lint.ts
  34. - run:
  35. name: Build Demos
  36. command: |
  37. if [ "${CIRCLE_BRANCH}" == "master" ]; then
  38. ./node_modules/.bin/gulp demos.prod --production=true --batch=$CIRCLE_NODE_INDEX --batches=$CIRCLE_NODE_TOTAL
  39. fi
  40. - add_ssh_keys
  41. - deploy:
  42. name: Update docs
  43. command: |
  44. if [ "${CIRCLE_BRANCH}" == "master" ]; then
  45. ./scripts/ci/deploy.sh
  46. else
  47. echo "We are on ${CIRCLE_BRANCH} branch, not going to update docs."
  48. fi