Created
March 10, 2018 09:48
-
-
Save mihaiserban/0e1aff960d673ee05dceec0f480f07c2 to your computer and use it in GitHub Desktop.
now zeit circleci deployment
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: 2 | |
jobs: | |
build: | |
docker: | |
- image: 'circleci/node:9.7.1' | |
branches: | |
only: | |
- master | |
steps: | |
- checkout | |
- restore_cache: | |
key: 'dependency-cache-{{ checksum "package.json" }}' | |
- run: | |
name: install | |
command: npm install | |
- save_cache: | |
key: 'dependency-cache-{{ checksum "./package.json" }}' | |
paths: | |
- ./node_modules | |
- deploy: | |
name: Deploy | |
command: npm run deploy | |
- deploy: | |
name: Alias | |
command: npm run alias |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
"scripts": {
"deploy": "./node_modules/.bin/now -e NODE_ENV=production --token $NOW_TOKEN --npm",
"alias": "./node_modules/.bin/now alias --token=$NOW_TOKEN"
},