Skip to content

Commit

Permalink
Update for deploy
Browse files Browse the repository at this point in the history
  • Loading branch information
sky172839465 committed Feb 7, 2019
1 parent 0aeba49 commit d36bcd1
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
7 changes: 7 additions & 0 deletions ghpage-deploy.sh
@@ -0,0 +1,7 @@
cd build
git init
git config user.name "Travis CI"
git config user.email "sky172839465@gmail.com"
git add .
git commit -m "Deploy to GitHub Pages"
git push --force --quiet "https://${GH_TOKEN}@${GH_REF}" master:gh-pages > /dev/null 2>&1
6 changes: 4 additions & 2 deletions package.json
@@ -1,5 +1,6 @@
{
"name": "test-app-starter",
"homepage": "https://sky172839465.github.io/test-app-starter/",
"version": "0.1.0",
"private": true,
"dependencies": {
Expand All @@ -18,7 +19,7 @@
},
"scripts": {
"start": "react-scripts start",
"build": "react-scripts build",
"build": "if react-scripts build; then echo '😏 Build success'; else echo '😨 Build failure'; exit 1; fi",
"test": "if CI=true react-scripts test --coverage --env=jsdom; then echo 'βœ… Unit test run success'; else echo '❌ Unit test run failure'; exit 1; fi",
"eject": "react-scripts eject",
"lint": "if standard --fix | snazzy; then echo 'πŸ’― Lint perfect'; else echo '⁉️ Lint get error please run `npm run lint` check again';exit 1; fi",
Expand All @@ -27,7 +28,8 @@
"kill:selenium": "lsof -t -i :4444 | xargs kill",
"functional::online": "if codeceptjs run --steps --config=./codecept/sauce.config.js; then echo '🎊 Functional test run success'; else echo 'πŸ’” Functional test run failure'; exit 1; fi",
"functional::online:localhost": "export BASE_URL=http://localhost:3000/; npm run functional::online",
"start::sauce_connect": "bin/sc -u $SAUCE_USERNAME -k $SAUCE_ACCESS_KEY"
"start::sauce_connect": "bin/sc -u $SAUCE_USERNAME -k $SAUCE_ACCESS_KEY",
"deploy::prod": "npm run build && if bash ./ghpage-deploy.sh; then echo 'πŸ€— Deploy success'; else echo '😱 Deploy failure'; exit 1; fi"
},
"eslintConfig": {
"extends": "react-app"
Expand Down

0 comments on commit d36bcd1

Please sign in to comment.