diff --git a/.travis.yml b/.travis.yml index d6cc12c4f3..cf94ae332a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -10,11 +10,8 @@ os: - linux script: - yarn test - - yarn build - - yarn exp-publish -before_deploy: rm -rf .cache .tmp node_modules build/client/ios build/client/android +before_deploy: rm -rf node_modules deploy: - skip_cleanup: true provider: heroku api_key: secure: fNhB+2DcXLoez7unhEMEUlL8WRBdWADn3Ye5Bm5MzFXVY2ZbjhhBaTo/v1XOHKRO/JrLNe7pzoaqwONWbhSTOe8sKBawUNQUAtcaR1MhZeLaCNGACblhc8YYffm4oRvwdv/N6GYZKo2aUsDwgkZmNu4GJFi3eBNXHaVobnzU09nnrs2WHm0JIiDs23z7TcIjTqC8sa7D7Q7LFeNhtsJl54s2s1wGfzEdhkPqc4OGM/87tLgtdwnCTPQs/nbetr6BfFndrT3fYmVbuFe6m4/e94eZHr7D/c2eiWEyb4FZv0FLkndY/7PCV0egUs1uSYkQeQcE2eAv5ZacgqYA9miFw3bhTEinM1ud0CfOxnYYtwniR4X0XxuHMpsVU71olChWnSwt7TvJG/uncjfvmWzWX+VA9f+n6Ya5+C893rledOLMrwJN6R+bqGLxBC0dwFI1Cfhxb/Io4/PjgmK0NNiSWJ+UCr26IEzKEAi7dz0zUqCDdykH9Co7R/hTeBT/rMrE0SYumc66Or4nhZohEFzdQSRBKtG+6xAcmMkLtut15grsxJ9+OvZUIIEoB2PFKuh4ephskEo5UQUQzVJscuFtDC+VIf+4vRwP8lvkV7LF6M8mN3FMyHwDb4+/q9lKIRAu4/fGY8P4NGrMSBgkgQI7CANgDj1mIROPsSVd4JVnpMc= diff --git a/README.md b/README.md index 2839a12211..f5a72ba644 100644 --- a/README.md +++ b/README.md @@ -441,6 +441,11 @@ yarn start ### Deploying to [Heroku] +1. Add your app to Heroku +2. Allow Heroku to install build time dependencies from the devDependencies in `package.json`: `Settings -> Config Variables -> Add`, KEY: `YARN_PRODUCTION`, VALUE: `false`. +3. Add `EXP_USERNAME` and `EXP_PASSWORD` config variables there as well. They will be used to publish mobile Expo Client applications +4. Deploy your app on Heroku + [![Deploy](https://www.herokucdn.com/deploy/button.svg)](https://heroku.com/deploy) ### Heroku Demo diff --git a/package.json b/package.json index bba2f9bf26..df83c7ef2b 100644 --- a/package.json +++ b/package.json @@ -3,7 +3,9 @@ "private": true, "version": "1.0.0", "main": "src/server", - "cacheDirectories": [".cache"], + "cacheDirectories": [ + ".cache" + ], "engines": { "node": ">= 6.11.1", "npm": ">= 3.10.3", @@ -23,7 +25,7 @@ "exp-login": "cross-env NODE_ENV=production spin exp login -u $EXP_USERNAME -p $EXP_PASSWORD --non-interactive", "watch": "spin watch", "exp-publish": "npm run exp-login && npm run exp -- p --non-interactive", - "heroku-postbuild": "NODE_ENV=production npm run seed", + "heroku-postbuild": "du -hs ./.cache && npm run build && du -hs ./.cache && npm run exp-publish && npm run seed", "precommit": "lint-staged", "cli": "node tools/cli", "postinstall": "opencollective postinstall",