Skip to content
This repository was archived by the owner on Dec 27, 2022. It is now read-only.

Commit dc523b6

Browse files
committed
enh/wip/brk getting travis to build and commit the preafqViewer to gh-pages
1 parent 3fc3b0c commit dc523b6

File tree

2 files changed

+61
-15
lines changed

2 files changed

+61
-15
lines changed

.travis.yml

Lines changed: 25 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,25 @@
1-
# Config file for automatic testing at travis-ci.org
2-
3-
language: python
4-
python:
5-
- 3.6
6-
- 3.5
7-
- 3.4
8-
9-
# Command to install dependencies, e.g. pip install -r requirements.txt --use-mirrors
10-
install: pip install -U tox-travis
11-
12-
# Command to run tests, e.g. python setup.py test
13-
script: tox
14-
15-
1+
sudo: false
2+
language: node_js
3+
node_js:
4+
- '6.0'
5+
cache:
6+
directories:
7+
- preafqViewer/node_modules
8+
branches:
9+
only:
10+
- master
11+
notifications:
12+
email: false
13+
before_script:
14+
- cd preafqViewer
15+
- npm prune
16+
script:
17+
- npm run build
18+
- npm test
19+
after_success:
20+
- bash ./deploy.sh
21+
env:
22+
global:
23+
- GH_USER: akeshavan
24+
- GH_REPO: preAFQ
25+
- secure: irToFjVhLgr3rOdobRrhpJqSJtamvDTiBHmq4Xr1m3G24rirSRqSEjp6zronYbyNJ/VnoIhc0L8/VKrDUNsGR+0zqwJ4b4/2nR7LG7grvH79hWz2zGOckm2oYFC0BKyCFSiJ4n5op5SVslARr2ONgO+BqtclBIVAyHcbfnRMhHawZvcaWDgUOeLT8cTCT3uddOWNRQY1bH+nwv7OjqpQHlvLTAXjSH7XdVoGnzPhK79F1djUrpzJSODcsZl+VU1ghVKc1fj8AEpha0m3ZF0dSRK9xYBXOYaoXsbjXjDMo2kZJd8vobZ2Tvl9WP8xpEEJjqFMRxqDCd9JZq9kr/vVWpirm7mWce65BiJBj7K2iBwWjruqeLhYLcM8bdIEDybTqV8ZeXeghcbBpw+L+5hgSHbEK+XZFmTO9XKOpF0XhvYjxpti8cv2PIJ6Dhg+j+LrAo3MkRuYZ19DgKdId4fr+PM6Fuxfwa/h0AkL2bKampeofrbRQZDS/Q2TxTfp4UaxMYhLWLoJqZFYsdcLIPjlmMPSTvvnWq+YJ8bHxqrdORiUKDY32uXQ/LBFrQVjgZJFzR7OOazWcxykpBMYJh5sH1A6a52xJj26heygM2CxPGdwzapFM1XmS0QZ+qeGVYx9YMSD+oBxgpHj3xQorvon+YEiSdnTeyLWKq7sTciTAPM=

preafqViewer/deploy.sh

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
#!/bin/bash
2+
3+
set -e # exit with nonzero exit code if anything fails
4+
5+
if [[ $TRAVIS_BRANCH == "master" && $TRAVIS_PULL_REQUEST == "false" ]]; then
6+
7+
echo "Starting to update gh-pages\n"
8+
9+
#copy data we're interested in to other place
10+
cp -R dist $HOME/dist
11+
12+
#go to home and setup git
13+
cd $HOME
14+
git config --global user.email "[email protected]"
15+
git config --global user.name "Travis"
16+
17+
#using token clone gh-pages branch
18+
git clone --quiet --branch=gh-pages https://${GH_TOKEN}@github.com/${GH_USER}/${GH_REPO}.git gh-pages > /dev/null
19+
20+
#go into directory and copy data we're interested in to that directory
21+
cd gh-pages
22+
cp -Rf $HOME/dist/* .
23+
24+
echo "Allow files with underscore https://help.github.com/articles/files-that-start-with-an-underscore-are-missing/" > .nojekyll
25+
echo "[View live](https://${GH_USER}.github.io/${GH_REPO}/)" > README.md
26+
27+
#add, commit and push files
28+
git add -f .
29+
git commit -m "Travis build $TRAVIS_BUILD_NUMBER"
30+
git push -fq origin gh-pages > /dev/null
31+
32+
echo "Done updating gh-pages\n"
33+
34+
else
35+
echo "Skipped updating gh-pages, because build is not triggered from the master branch."
36+
fi;

0 commit comments

Comments
 (0)