File tree Expand file tree Collapse file tree 2 files changed +28
-0
lines changed
Expand file tree Collapse file tree 2 files changed +28
-0
lines changed Original file line number Diff line number Diff line change 77 - npm run lint
88 - npm test
99 - npm run browser
10+ - npm run docs
1011after_success :
1112 - npm run coveralls
13+ - ./.travis_build_pages
1214cache :
1315 directories :
1416 - node_modules
Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+ # Only publish from the main repository's master branch
3+ REPO_NAME=" RubenVerborgh/N3.js"
4+ if [ " $TRAVIS_REPO_SLUG " != " $REPO_NAME " ] || [ " $TRAVIS_BRANCH " != " master" ] || [ " $TRAVIS_PULL_REQUEST " != " false" ]; then exit ; fi
5+ echo -e " Generating gh-pages...\n"
6+
7+ # Checkout the gh-pages branch
8+ REPO_PATH=$PWD
9+ pushd $HOME
10+ git clone --quiet --branch=gh-pages https://${GH_TOKEN} @github.com/$REPO_NAME gh-pages 2>&1 > /dev/null
11+ cd gh-pages
12+
13+ # Don't update if already at the latest version
14+ if [[ ` git log -1 --pretty=%B` == * $TRAVIS_COMMIT * ]]; then exit ; fi
15+
16+ # Update pages
17+ rm -r docs 2> /dev/null
18+ cp -r $REPO_PATH /docs .
19+
20+ # Commit and push latest version
21+ git add .
22+ git config user.name " Travis"
23+ git config user.email
" [email protected] " 24+ git commit -m " Update to $TRAVIS_COMMIT ."
25+ git push -fq origin gh-pages 2>&1 > /dev/null
26+ popd
You can’t perform that action at this time.
0 commit comments