From aaff84b1b1797eda3564514b4ffddc5a4bf8f0cf Mon Sep 17 00:00:00 2001 From: Cedric van Putten Date: Sun, 14 Oct 2018 20:18:21 +0200 Subject: [PATCH] pipeline: add build and staging deployments (#41) This can be used to test and demo the project for others. Later a docker build script should be added for a one-liner deployment with Now. --- .travis.yml | 4 ++++ now.staging.json | 10 ++++++++++ package.json | 1 + 3 files changed, 15 insertions(+) create mode 100644 now.staging.json diff --git a/.travis.yml b/.travis.yml index 059516f..1961fcb 100644 --- a/.travis.yml +++ b/.travis.yml @@ -20,6 +20,7 @@ script: - npx stylelint ./src/**/*.js - npx eslint ./src - npx react-scripts test --coverage + - npm run build after_success: - npx codecov @@ -29,6 +30,9 @@ deploy: skip_cleanup: true script: - npx semantic-release --dry-run --branch develop + - npm run build + - npx now ./build -t $NOW_TOKEN -T personal -A ./now.staging.json + - npx now alias -A ./now.staging.json on: condition: $TRAVIS_OS_NAME = linux branch: develop diff --git a/now.staging.json b/now.staging.json new file mode 100644 index 0000000..fe64376 --- /dev/null +++ b/now.staging.json @@ -0,0 +1,10 @@ +{ + "public": true, + "type": "static", + "name": "bycedric-website-staging", + "alias": [ + "staging.bycedric.com", + "staging-bycedric.now.sh", + "staging-github.now.sh" + ] +} diff --git a/package.json b/package.json index bf0405d..6be85f4 100644 --- a/package.json +++ b/package.json @@ -27,6 +27,7 @@ "@semantic-release/changelog": "^3.0.0", "codecov": "^3.1.0", "conventional-changelog-peakfijn": "^0.8.0", + "now": "^11.4.6", "react-scripts": "2.0.4", "release-rules-peakfijn": "^0.8.0", "semantic-release": "^15.9.16",