Skip to content

Instantly share code, notes, and snippets.

@mihaiserban
Created March 10, 2018 09:48
Show Gist options
  • Save mihaiserban/0e1aff960d673ee05dceec0f480f07c2 to your computer and use it in GitHub Desktop.
Save mihaiserban/0e1aff960d673ee05dceec0f480f07c2 to your computer and use it in GitHub Desktop.
now zeit circleci deployment
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
@mihaiserban
Copy link
Author

"scripts": {
"deploy": "./node_modules/.bin/now -e NODE_ENV=production --token $NOW_TOKEN --npm",
"alias": "./node_modules/.bin/now alias --token=$NOW_TOKEN"
},

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment