Created
May 31, 2017 07:59
-
-
Save knowbody/304fd5417772da5cf637bec68320a799 to your computer and use it in GitHub Desktop.
Zeit now.sh and CircleCI config
This file contains hidden or 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
| machine: | |
| environment: | |
| PATH: "${PATH}:${HOME}/${CIRCLE_PROJECT_REPONAME}/node_modules/.bin" | |
| node: | |
| version: 7.10.0 | |
| dependencies: | |
| override: | |
| - yarn | |
| cache_directories: | |
| - ~/.cache/yarn | |
| pre: | |
| - yarn global add now | |
| test: | |
| override: | |
| - yarn test | |
| deployment: | |
| development: | |
| branch: master | |
| commands: | |
| - now -t ${NOW_TOKEN} | |
| - now -t ${NOW_TOKEN} alias foo-dev | |
| production: | |
| branch: production | |
| commands: | |
| - now -t ${NOW_TOKEN} | |
| - now -t ${NOW_TOKEN} alias foo |
This file contains hidden or 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
| { | |
| "alias": [ | |
| "foo", | |
| "foo-dev" | |
| ], | |
| "forwardNpm": true | |
| } |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This setup tells CircleCI to use
yarninstead ofnpm.It installs
nowglobally, overrides the default test script withyarn test.It deploy from two branches
masterandproduction.To use
now aliaswithoutnow alias set, thealiasproperty needs to be set innow.json.I also use
forwardNpmflag, sonowuses.npmrcto access the private modules.NOW_TOKENwas generated on the https://now.sh and is set as an env variable on CircleCI dashboard.