Skip to content
This repository was archived by the owner on Oct 7, 2020. It is now read-only.

Commit 2409ba1

Browse files
committed
Set up of auto docs generation.
1 parent e5d6199 commit 2409ba1

File tree

4 files changed

+28
-5
lines changed

4 files changed

+28
-5
lines changed

.codecov.yml

+1-4
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,7 @@ coverage:
99

1010
status:
1111
project: yes
12-
patch: yes/**
13-
* Created by daniele on 07/03/17.
14-
*/
15-
12+
patch: yes
1613
changes: no
1714

1815
parsers:

.travis.yml

+10
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,11 @@ branches:
66
only:
77
- master
88

9+
notifications:
10+
email:
11+
on_success: change
12+
on_failure: change
13+
914
install:
1015
npm install
1116

@@ -14,3 +19,8 @@ script:
1419

1520
after_success:
1621
./node_modules/.bin/nyc report --reporter=text-lcov > coverage.lcov && ./node_modules/.bin/codecov
22+
23+
deploy:
24+
skip_cleanup: true
25+
provider: script
26+
script: ./updateDocs.sh

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
"ci_test": "./test/runTests.sh --no-warning",
99
"js_test": "node test/runTests.js",
1010
"_test": "nyc ./node_modules/mocha/bin/mocha test/testsOrder.js --report spec",
11-
"generate-docs": "node_modules/.bin/jsdoc --configure .jsdoc.json --verbose"
11+
"generate_docs": "./node_modules/.bin/jsdoc --configure .jsdoc.json --verbose"
1212
},
1313
"repository": {
1414
"type": "git",

updateDocs.sh

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
#!/usr/bin/env bash
2+
3+
if [ ${TRAVIS_BRANCH} = "master" ] && [ ${TRAVIS_PULL_REQUEST} = "false" ]
4+
then
5+
npm run generate_docs
6+
git config --global user.email "[email protected]"
7+
git config --global user.name "travis-ci"
8+
git clone --quiet --branch=gh-pages https://${GH_TOKEN}@https://github.com/danibix95/chino-nodejs.git gh-pages
9+
cd gh-pages
10+
git rm -rf .
11+
cp -r ../docs/*/* .
12+
git add -A
13+
git commit -m "Documentation updated by Travis CI (build $TRAVIS_BUILD_NUMBER)"
14+
git push --quiet https://${GH_TOKEN}@github.com/danibix95/chino-nodejs.git gh-pages
15+
cd ..
16+
fi

0 commit comments

Comments
 (0)