-
Notifications
You must be signed in to change notification settings - Fork 50
/
circle.yml
41 lines (35 loc) · 1.09 KB
/
circle.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
# .circleci/config.yml
version: 2
jobs:
build:
docker:
- image: node:8
environment:
JOBS: 2
working_directory: ~/repo
steps:
- checkout
# Download and cache dependencies
- restore_cache:
keys:
- npm-deps-{{ checksum "package.json" }}
# fallback to using the latest cache if no exact match is found
- npm-deps-
- run: npm install
- save_cache:
paths:
- node_modules
key: npm-deps-{{ checksum "package.json" }}
# - run:
# name: Testing
# command: npm run lint && npm run ng -- test --watch=false --progress=false && npm run ng -- e2e
- run:
name: Building production
command: npm run ng -- build --prod
- deploy:
name: Deploying to Firebase hosting
command: |
if [ "${CIRCLE_BRANCH}" == "master" ]; then
npm install -g firebase-tools
firebase deploy --only hosting -m "build $CIRCLE_BUILD_NUM" --token $FIREBASE_TOKEN --non-interactive
fi