forked from hbc/bcbioRNASeq
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtravis_render.sh
executable file
·39 lines (34 loc) · 1007 Bytes
/
travis_render.sh
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
39
#!/bin/sh
render_templates() {
pwd
cd ..
git clone https://github.com/bcbio/bcbio_rnaseq_output_example.git
cd bcbio_rnaseq_output_example
Rscript -e 'devtools::install_local("../bcbioRNASeq")'
Rscript -e 'testthat::test_file("test_reports.R")'
cd report
mv de.html de-${TRAVIS_BRANCH}.html
mv qc.html qc-${TRAVIS_BRANCH}.html
mv fa.html fa-${TRAVIS_BRANCH}.html
cd ..
}
setup_git() {
git config --global user.email "travis@travis-ci.org"
git config --global user.name "Travis CI"
}
commit_website_files() {
git fetch origin gh-pages
git checkout gh-pages
git pull
cp report/*.html .
git add *.html
git commit --message "Travis build: $TRAVIS_BUILD_NUMBER"
}
upload_files() {
git remote add origin-pages https://${GITHUB_TOKE}@github.com/bcbio/bcbio_rnaseq_output_example.git > /dev/null 2>&1
git push --force --quiet --set-upstream origin-pages gh-pages
}
render_templates
setup_git
commit_website_files
upload_files