Skip to content

Commit

Permalink
add command that deploy hosting when git push
Browse files Browse the repository at this point in the history
  • Loading branch information
samuraikun committed Sep 28, 2018
1 parent e24b9cd commit d45a2d1
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
14 changes: 10 additions & 4 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,14 @@ version: 2
jobs:
build:
docker:
# specify the version you desire here
- image: circleci/node:8

# Specify service dependencies here if necessary
# CircleCI maintains a library of pre-built images
# documented at https://circleci.com/docs/2.0/circleci-images/
# - image: circleci/mongo:3.4.4

working_directory: ~/repo
working_directory: ~/firebase-youtube-clone

steps:
- checkout
Expand All @@ -27,11 +26,18 @@ jobs:
- v1-dependencies-

- run: npm install
- run:
name: 'Install Dependecies'
command: npm install --save-dev firebase-tools create-react-app

- save_cache:
paths:
- node_modules
key: v1-dependencies-{{ checksum "package.json" }}

# run tests!
- run: npm run circleci
- run:
name: 'Build Client Code'
command: npm run build
- run:
name: 'Deploy to Hosting'
command: firebase deploy --only hosting --project "$FIREBASE_PROJECT_ID" --token "$FIREBASE_TOKEN"
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
"start": "react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test --env=jsdom",
"eject": "react-scripts eject",
"circleci": "echo Hello CircleCI."
"eject": "react-scripts eject"
}
}

0 comments on commit d45a2d1

Please sign in to comment.