Skip to content

Commit

Permalink
Ci deployment (#109)
Browse files Browse the repository at this point in the history
* adding ci

* single script

* ampersand chaining

* removing ambiguous deployment type

* adding env

* updating dep

* updaitng yarnrc

* adding random yarnrc
  • Loading branch information
charliewilco committed Nov 6, 2018
1 parent fdc3bb2 commit 8f728c5
Show file tree
Hide file tree
Showing 7 changed files with 47 additions and 11 deletions.
13 changes: 13 additions & 0 deletions .travis.yml
Expand Up @@ -10,3 +10,16 @@ script:
- yarn workspace client typecheck
- yarn workspace client build
- yarn workspace client test
before_deploy: yarn global add now
deploy:
- provider: script # Run a custom deployment script which we will define below
script: yarn workspace client deploy:ci && yarn workspace api deploy:ci
skip_cleanup: true
on:
all_branches: true
master: false
- provider: script
script: yarn workspace client deploy:token && yarn workspace api deploy:token
skip_cleanup: true
on:
master: true
1 change: 1 addition & 0 deletions .yarnrc
@@ -1,2 +1,3 @@
--ignore-engines true
workspaces-experimental true
registry "https://registry.yarnpkg.com/"
3 changes: 3 additions & 0 deletions api/.yarnrc
@@ -0,0 +1,3 @@
--ignore-engines true
workspaces-experimental true
registry "https://registry.yarnpkg.com/"
7 changes: 4 additions & 3 deletions api/package.json
Expand Up @@ -7,7 +7,8 @@
"scripts": {
"build": "tsc",
"predev": "yarn build",
"deploy": "now && now alias",
"deploy:ci": "now --token $NOW_TOKEN",
"deploy:token": "now --token $NOW_TOKEN && now alias --token $NOW_TOKEN",
"start": "node dist/server.js",
"dev": "nodemon",
"test": "jest",
Expand Down Expand Up @@ -39,7 +40,7 @@
"mongoose": "^5.2.17",
"typescript": "^3.0.3",
"uuid": "^3.1.0",
"vision": "^5.4.0"
"vision": "^5.4.2"
},
"devDependencies": {
"jest": "^22.4.0",
Expand All @@ -58,7 +59,7 @@
}
},
"env": {
"PORT": 4411,
"PORT": "4411",
"NODE_ENV": "production",
"SECRET_KEY": "@dw-key",
"DB_USER": "@dw-db-user",
Expand Down
3 changes: 3 additions & 0 deletions client/.yarnrc
@@ -0,0 +1,3 @@
--ignore-engines true
workspaces-experimental true
registry "https://registry.yarnpkg.com/"
5 changes: 3 additions & 2 deletions client/package.json
Expand Up @@ -10,8 +10,8 @@
"build": "next build",
"start": "NODE_ENV=production node server.js",
"test": "NODE_ENV=test jest --env=jsdom --verbose --silent",
"test:integration": "jest --config=./puppeteer.json",
"deploy": "now && now alias"
"deploy:ci": "now --token $NOW_TOKEN",
"deploy:token": "now --token $NOW_TOKEN && now alias --token $NOW_TOKEN"
},
"dependencies": {
"@charliewilco/sanitize-object": "^1.0.1",
Expand Down Expand Up @@ -123,6 +123,7 @@
},
"now": {
"name": "next-downwrite",
"type": "npm",
"alias": [
"beta.downwrite.us"
],
Expand Down
26 changes: 20 additions & 6 deletions yarn.lock
Expand Up @@ -4696,6 +4696,11 @@ hoek@5.x.x:
resolved "https://registry.npmjs.org/hoek/-/hoek-5.0.4.tgz#0f7fa270a1cafeb364a4b2ddfaa33f864e4157da"
integrity sha512-Alr4ZQgoMlnere5FZJsIyfIjORBqZll5POhDsF4q64dPuJR6rNxXdDxtHSQq8OXRurhmx+PWYEE8bXRROY8h0w==

hoek@6.x.x:
version "6.0.1"
resolved "https://registry.npmjs.org/hoek/-/hoek-6.0.1.tgz#15ae90f8d30ad114e2feabe4967567014a783078"
integrity sha512-3PvUwBerLNVJiIVQdpkWF9F/M0ekgb2NPJWOhsE28RXSQPsY42YSnaJ8d1kZjcAz58TZ/Fk9Tw64xJsENFlJNw==

hoist-non-react-statics@2.5.5, hoist-non-react-statics@^2.1.1, hoist-non-react-statics@^2.5.0, hoist-non-react-statics@^2.5.5:
version "2.5.5"
resolved "https://registry.npmjs.org/hoist-non-react-statics/-/hoist-non-react-statics-2.5.5.tgz#c5903cf409c0dfd908f388e619d86b9c1174cb47"
Expand Down Expand Up @@ -6243,6 +6248,15 @@ joi@13.x.x, joi@^13.6.0:
isemail "3.x.x"
topo "3.x.x"

joi@14.x.x:
version "14.0.4"
resolved "https://registry.npmjs.org/joi/-/joi-14.0.4.tgz#f066f79330f6bd6f3dda243be6d2c211f83a5f9b"
integrity sha512-KUXRcinDUMMbtlOk7YLGHQvG73dLyf8bmgE+6sBTkdJbZpeGVGAlPXEHLiQBV7KinD/VLD5OA0EUgoTTfbRAJQ==
dependencies:
hoek "6.x.x"
isemail "3.x.x"
topo "3.x.x"

joi@^11.1.1:
version "11.4.0"
resolved "https://registry.npmjs.org/joi/-/joi-11.4.0.tgz#f674897537b625e9ac3d0b7e1604c828ad913ccb"
Expand Down Expand Up @@ -10678,15 +10692,15 @@ vise@3.x.x:
dependencies:
hoek "5.x.x"

vision@^5.4.0:
version "5.4.0"
resolved "https://registry.npmjs.org/vision/-/vision-5.4.0.tgz#fc620deb95227881ea8b8d8a044dc1d1fd40e584"
integrity sha512-f8kbjvo/dUbR4ZDF0pHPuOjQFg/6zOMlP1Tb9gK2ukCa7Ksd24174DCzubtov6AxIDhZhO5RYQeeDlF8ujlKWQ==
vision@^5.4.2:
version "5.4.2"
resolved "https://registry.npmjs.org/vision/-/vision-5.4.2.tgz#09bd5821f1abab8c484022c667c06acc898b47e3"
integrity sha512-VMDxICq7u8SaEXIVRamhhK+RX9jvD0uK8yPYJTj80yFwPffirkxqB2A9I9ipvwi1fA+JzEIaErdgsel0SVFUZw==
dependencies:
boom "7.x.x"
hoek "5.x.x"
hoek "6.x.x"
items "2.x.x"
joi "13.x.x"
joi "14.x.x"

vm-browserify@0.0.4:
version "0.0.4"
Expand Down

0 comments on commit 8f728c5

Please sign in to comment.