ocrcc-chatbox/.circleci/config.yml

49 lines
1.1 KiB
YAML
Raw Normal View History

2018-05-30 01:56:01 +00:00
version: 2
jobs:
build:
docker:
- image: node:10
steps:
- checkout
- run:
name: dep install
command: npm install
2018-05-30 02:11:02 +00:00
- run:
name: install codecov
command: npm install -g codecov
2018-05-30 01:56:01 +00:00
- run:
name: test
2018-05-30 02:11:02 +00:00
command: npm test && codecov
- run:
name: build
command: |
npm run build
[ -f ./dist/index.html ] || exit 1
[ -f ./dist/blank.html ] || exit 1
[ -f ./dist/widget.js ] || exit 1
[ -f ./dist/bookmarklet.js ] || exit 1
2019-06-15 02:24:56 +00:00
- run:
name: npm start works
command: |
npm run start &
pid=$!
sleep 10s
ps $pid
- run:
name: deploy
command: |
if [ "$CIRCLE_BRANCH" = "master" ]; then
2019-06-15 02:05:53 +00:00
git config --global user.email $GH_EMAIL
git config --global user.name $GH_NAME
npm run deploy
fi
workflows:
version: 2
build-deploy:
jobs:
2019-06-15 02:24:56 +00:00
- build:
filters:
branches:
ignore: gh-pages