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

Commit

Permalink
feature: upgrade to now version 2 (#79)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
byCedric committed Nov 28, 2018
1 parent 3878702 commit f97f7ab
Show file tree
Hide file tree
Showing 7 changed files with 24,668 additions and 48 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,4 @@
npm-debug.log*
yarn-debug.log*
yarn-error.log*
package-lock.json
yarn.lock
27 changes: 0 additions & 27 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,45 +2,18 @@
language: node_js
node_js:
- node

os:
- linux
- osx

cache:
directories:
- node_modules

install:
- npm install

script:
- npx commitlint-travis
- npx stylelint './src/**/*.js'
- npx eslint ./src
- npx react-scripts test --coverage
- npm run build

after_success:
- npx codecov

deploy:
- provider: script
skip_cleanup: true
script: >-
npx semantic-release --dry-run --branch develop &&
npm run build &&
cp now.staging.json now.json &&
npx now deploy --token=$NOW_TOKEN --team=personal --name=bycedric-website-staging --regions=bru ./build &&
npx now alias --token=$NOW_TOKEN --team=personal
on:
condition: $TRAVIS_OS_NAME = linux
branch: develop
node: node
- provider: script
skip_cleanup: true
script: npx semantic-release
on:
condition: $TRAVIS_OS_NAME = linux
branch: master
node: node
21 changes: 14 additions & 7 deletions now.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,18 @@
{
"type": "docker",
"features": {
"cloud": "v2"
},
"version": 2,
"name": "github-website",
"builds": [
{ "src": "package.json", "use": "@now/static-build" }
],
"routes": [
{ "src": "^/robots\\.txt", "dest": "/robots.txt" },
{ "src": "^/static/(.*)", "dest": "/static/$1" },
{ "src": ".*", "dest": "/index.html" }
],
"build": {
"env": [
"GITHUB_USERNAME"
]
"env": {
"NODE_PATH": "./",
"REACT_APP_GITHUB_USERNAME": "byCedric"
}
}
}
10 changes: 0 additions & 10 deletions now.staging.json

This file was deleted.

Loading

0 comments on commit f97f7ab

Please sign in to comment.