forked from bids-standard/legacy-validator
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcircle.yml
38 lines (36 loc) · 1.07 KB
/
circle.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
machine:
node:
version: 4.3.0
test:
override:
# Lint
- npm run lint
# Run unit tests
- npm run test
# Test gh-pages build
- rm -rf node_modules/
- git checkout gh-pages
- npm install
- if [ -z ${CIRCLE_PR_USERNAME}]; then npm install ${CIRCLE_REPOSITORY_URL}.git\#${CIRCLE_SHA1}; else npm install git+https://[email protected]/${CIRCLE_PR_USERNAME}/${CIRCLE_PR_REPONAME}.git\#${CIRCLE_SHA1}; fi
- gulp build
deployment:
production:
branch: master
commands:
# Publish to NPM
- echo -e "$NPM_USERNAME\n$NPM_PASSWORD\n$NPM_EMAIL" | npm login
- git checkout -f master
- npm install publish
- npm run npmPublish
# Update gh-pages demo site
- git config --global user.email circleci@circleci
- git config --global user.name CircleCI
- rm -rf node_modules/
- rm -rf tests/
- git checkout gh-pages
- git pull
- npm install
- gulp build
- git status
- git commit dist/ --allow-empty -m "Circle CI - validator demo update"
- git push origin gh-pages