Skip to content
This repository was archived by the owner on Apr 9, 2023. It is now read-only.

Commit f97f7ab

Browse files
committed
feature: upgrade to now version 2 (#79)
* refactor: remove now from dev dependencies This is not required anymore because of Now's GitHub integration. * refactor: remove separated now staging settings * feature: update configuration for now version 2 * refactor: clean up old now deployment scripts * feature: add robots file for crawlers to now * refactor: allow package as scope for greenkeeper lockfile Unfortunately, this message is not customisable yet. See this issue greenkeeperio/greenkeeper-lockfile#88. * refactor: add npm lock file for faster now deployments
1 parent 3878702 commit f97f7ab

7 files changed

+24668
-48
lines changed

.gitignore

-1
Original file line numberDiff line numberDiff line change
@@ -20,5 +20,4 @@
2020
npm-debug.log*
2121
yarn-debug.log*
2222
yarn-error.log*
23-
package-lock.json
2423
yarn.lock

.travis.yml

-27
Original file line numberDiff line numberDiff line change
@@ -2,45 +2,18 @@
22
language: node_js
33
node_js:
44
- node
5-
65
os:
76
- linux
87
- osx
9-
108
cache:
119
directories:
1210
- node_modules
13-
1411
install:
1512
- npm install
16-
1713
script:
1814
- npx commitlint-travis
1915
- npx stylelint './src/**/*.js'
2016
- npx eslint ./src
2117
- npx react-scripts test --coverage
22-
- npm run build
23-
2418
after_success:
2519
- npx codecov
26-
27-
deploy:
28-
- provider: script
29-
skip_cleanup: true
30-
script: >-
31-
npx semantic-release --dry-run --branch develop &&
32-
npm run build &&
33-
cp now.staging.json now.json &&
34-
npx now deploy --token=$NOW_TOKEN --team=personal --name=bycedric-website-staging --regions=bru ./build &&
35-
npx now alias --token=$NOW_TOKEN --team=personal
36-
on:
37-
condition: $TRAVIS_OS_NAME = linux
38-
branch: develop
39-
node: node
40-
- provider: script
41-
skip_cleanup: true
42-
script: npx semantic-release
43-
on:
44-
condition: $TRAVIS_OS_NAME = linux
45-
branch: master
46-
node: node

now.json

+14-7
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,18 @@
11
{
2-
"type": "docker",
3-
"features": {
4-
"cloud": "v2"
5-
},
2+
"version": 2,
3+
"name": "github-website",
4+
"builds": [
5+
{ "src": "package.json", "use": "@now/static-build" }
6+
],
7+
"routes": [
8+
{ "src": "^/robots\\.txt", "dest": "/robots.txt" },
9+
{ "src": "^/static/(.*)", "dest": "/static/$1" },
10+
{ "src": ".*", "dest": "/index.html" }
11+
],
612
"build": {
7-
"env": [
8-
"GITHUB_USERNAME"
9-
]
13+
"env": {
14+
"NODE_PATH": "./",
15+
"REACT_APP_GITHUB_USERNAME": "byCedric"
16+
}
1017
}
1118
}

now.staging.json

-10
This file was deleted.

0 commit comments

Comments
 (0)