2017-03-28 19:31:39 -04:00
|
|
|
version: 2
|
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
working_directory: ~/ionic-native/
|
|
|
|
docker:
|
2019-07-12 20:09:33 +02:00
|
|
|
- image: node:12
|
2017-03-28 19:31:39 -04:00
|
|
|
steps:
|
2017-03-28 19:46:17 -04:00
|
|
|
- checkout
|
2017-03-28 19:45:44 -04:00
|
|
|
- restore_cache:
|
2017-06-11 17:37:06 -04:00
|
|
|
key: ionic-site-{{ checksum "package.json" }}
|
2017-03-28 19:31:39 -04:00
|
|
|
- run:
|
2017-03-28 19:59:33 -04:00
|
|
|
name: Prepare ionic-site repo
|
2017-05-14 03:19:48 -04:00
|
|
|
command: |
|
|
|
|
if [ "${CIRCLE_BRANCH}" == "master" ]; then
|
|
|
|
./scripts/docs/prepare.sh
|
|
|
|
fi
|
2017-03-28 19:31:39 -04:00
|
|
|
- save_cache:
|
2017-06-11 17:37:06 -04:00
|
|
|
key: ionic-site-{{ checksum "package.json" }}
|
2017-03-28 19:59:33 -04:00
|
|
|
paths:
|
|
|
|
- ~/ionic-site/
|
|
|
|
- restore_cache:
|
2017-03-28 20:06:28 -04:00
|
|
|
key: node_modules_{{ checksum "package.json" }}
|
2017-03-28 19:31:39 -04:00
|
|
|
- run:
|
2017-03-28 19:41:50 -04:00
|
|
|
name: Install node modules
|
2019-05-16 07:04:44 +02:00
|
|
|
command: npm ci
|
2017-03-28 19:59:33 -04:00
|
|
|
- save_cache:
|
2017-03-28 20:13:44 -04:00
|
|
|
key: node_modules_{{ checksum "package.json" }}
|
2017-03-28 19:59:33 -04:00
|
|
|
paths:
|
2017-03-28 20:02:33 -04:00
|
|
|
- ~/ionic-native/node_modules/
|
2017-03-28 19:59:33 -04:00
|
|
|
- run:
|
|
|
|
name: Run tslint
|
|
|
|
command: npm run lint
|
2017-05-19 06:52:49 -04:00
|
|
|
- run: bash ./scripts/git/config.sh
|
2017-05-14 03:19:48 -04:00
|
|
|
- run:
|
2017-06-11 17:26:01 -04:00
|
|
|
name: Build Ionic Native
|
2017-12-28 07:28:44 -05:00
|
|
|
command: npm run build
|
2017-07-03 07:40:38 -04:00
|
|
|
- run:
|
|
|
|
name: Generate README files to ensure docs are valid
|
|
|
|
command: npm run readmes
|
2017-05-14 03:25:33 -04:00
|
|
|
- run:
|
|
|
|
name: Run tests
|
|
|
|
command: npm test
|
2017-03-28 20:30:41 -04:00
|
|
|
- add_ssh_keys
|
2017-03-28 20:13:44 -04:00
|
|
|
- deploy:
|
2017-03-28 19:31:39 -04:00
|
|
|
name: Update docs
|
2017-03-28 20:13:44 -04:00
|
|
|
command: |
|
2017-03-28 20:32:14 -04:00
|
|
|
if [ "${CIRCLE_BRANCH}" == "master" ]; then
|
2017-03-28 20:13:44 -04:00
|
|
|
./scripts/docs/update_docs.sh
|
|
|
|
else
|
2017-03-28 20:22:34 -04:00
|
|
|
echo "We are on ${CIRCLE_BRANCH} branch, not going to update docs."
|
2017-03-28 20:13:44 -04:00
|
|
|
fi
|