Skip to content

Commit

Permalink
Use Travis to build documentation from master branch
Browse files Browse the repository at this point in the history
  • Loading branch information
jpellman committed Nov 19, 2015
1 parent c910d90 commit bd4658f
Show file tree
Hide file tree
Showing 29 changed files with 6,777 additions and 0 deletions.
11 changes: 11 additions & 0 deletions .travis.yml
@@ -0,0 +1,11 @@

# .travis.yml

script: bundle exec rake travis

env:
- secure: "ldxWJXz2Z0hhjYETZ7qW0R3IBvBHCE5ZNLS4CYawEQKCGBPneePA8o5/evw8K8Ra3yQI3Ba/XmRZlPQ3aHxW+GReb7yb/HDhe+9obUKikBXvDXErUKQm/2G0PrhXm518uBxaChfQBj2psq9FjnbrHX6ZcVU7L2JhoQfedOOFt9Q="

branches:
only:
- master
4 changes: 4 additions & 0 deletions Gemfile
@@ -0,0 +1,4 @@
source "https://rubygems.org"

gem 'rake', '~> 10.4.2'
gem 'jekyll', '~> 2.5.2'
49 changes: 49 additions & 0 deletions Rakefile
@@ -0,0 +1,49 @@
require 'fileutils'
require 'rake'
require 'tmpdir'

destination = './docs/_site/'

desc 'Builds the website using Jekyll'
task :build do
puts 'Rendering markdown to HTML with Jekyll'
sh "cd docs && jekyll build"
puts 'Rendering finished- results are in _site'
end

# From Evan Osenko @ https://evansosenko.com/posts/automatic-publishing-github-pages-travis-ci/
desc 'Generate deck from Travis CI and publish to GitHub Pages.'
task :travis do
# if this is a pull request, do a simple build of the site and stop
if ENV['TRAVIS_PULL_REQUEST'].to_s.to_i > 0
puts 'Pull request detected. Executing build only.'
sh 'bundle exec rake build'
next
end

repo = %x(git config remote.origin.url).gsub(/^git:/, 'https:').strip
deploy_url = repo.gsub %r{https://}, "https://#{ENV['GH_TOKEN']}@"
deploy_branch = repo.match(/github\.io\.git$/) ? 'master' : 'gh-pages'
rev = %x(git rev-parse HEAD).strip

Dir.mktmpdir do |dir|
dir = File.join dir, 'site'
sh 'bundle exec rake build'
fail "Build failed." unless Dir.exists? destination
sh "git clone --branch #{deploy_branch} #{repo} #{dir}"
sh %Q(rsync -rt --del --exclude=".git" --exclude=".nojekyll" #{destination} #{dir})
Dir.chdir dir do
# setup credentials so Travis CI can push to GitHub
verbose false do
sh "git config user.name '#{ENV['GIT_NAME']}'"
sh "git config user.email '#{ENV['GIT_EMAIL']}'"
end

sh 'git add --all'
sh "git commit -m 'Built from #{rev}'."
verbose false do
sh "git push -q #{deploy_url} #{deploy_branch}"
end
end
end
end
2 changes: 2 additions & 0 deletions docs/Gemfile
@@ -0,0 +1,2 @@
source 'https://rubygems.org'
gem 'github-pages'
96 changes: 96 additions & 0 deletions docs/Gemfile.lock
@@ -0,0 +1,96 @@
GEM
remote: https://rubygems.org/
specs:
RedCloth (4.2.9)
activesupport (4.1.1)
i18n (~> 0.6, >= 0.6.9)
json (~> 1.7, >= 1.7.7)
minitest (~> 5.1)
thread_safe (~> 0.1)
tzinfo (~> 1.1)
blankslate (2.1.2.4)
classifier (1.3.4)
fast-stemmer (>= 1.0.0)
colorator (0.1)
commander (4.1.6)
highline (~> 1.6.11)
fast-stemmer (1.0.2)
ffi (1.9.3)
gemoji (1.5.0)
github-pages (19)
RedCloth (= 4.2.9)
jekyll (= 1.5.1)
jekyll-mentions (= 0.0.6)
jekyll-redirect-from (= 0.3.1)
jekyll-sitemap (= 0.3.0)
jemoji (= 0.1.0)
kramdown (= 1.3.1)
liquid (= 2.5.5)
maruku (= 0.7.0)
rdiscount (= 2.1.7)
redcarpet (= 2.3.0)
highline (1.6.21)
html-pipeline (1.5.0)
activesupport (>= 2)
nokogiri (~> 1.4)
i18n (0.6.9)
jekyll (1.5.1)
classifier (~> 1.3)
colorator (~> 0.1)
commander (~> 4.1.3)
liquid (~> 2.5.5)
listen (~> 1.3)
maruku (= 0.7.0)
pygments.rb (~> 0.5.0)
redcarpet (~> 2.3.0)
safe_yaml (~> 1.0)
toml (~> 0.1.0)
jekyll-mentions (0.0.6)
html-pipeline (~> 1.5.0)
jekyll (~> 1.4)
jekyll-redirect-from (0.3.1)
jekyll (~> 1.4)
jekyll-sitemap (0.3.0)
jekyll (~> 1.4)
jemoji (0.1.0)
gemoji (~> 1.5.0)
html-pipeline (~> 1.5.0)
jekyll (~> 1.4)
json (1.8.1)
kramdown (1.3.1)
liquid (2.5.5)
listen (1.3.1)
rb-fsevent (>= 0.9.3)
rb-inotify (>= 0.9)
rb-kqueue (>= 0.2)
maruku (0.7.0)
mini_portile (0.6.0)
minitest (5.3.4)
nokogiri (1.6.2.1)
mini_portile (= 0.6.0)
parslet (1.5.0)
blankslate (~> 2.0)
posix-spawn (0.3.8)
pygments.rb (0.5.4)
posix-spawn (~> 0.3.6)
yajl-ruby (~> 1.1.0)
rb-fsevent (0.9.4)
rb-inotify (0.9.4)
ffi (>= 0.5.0)
rb-kqueue (0.2.3)
ffi (>= 0.5.0)
rdiscount (2.1.7)
redcarpet (2.3.0)
safe_yaml (1.0.3)
thread_safe (0.3.4)
toml (0.1.1)
parslet (~> 1.5.0)
tzinfo (1.2.1)
thread_safe (~> 0.1)
yajl-ruby (1.1.0)

PLATFORMS
ruby

DEPENDENCIES
github-pages
48 changes: 48 additions & 0 deletions docs/_config.yml
@@ -0,0 +1,48 @@
plugins: ./_plugins
layouts: ./_layouts
include: ['.htaccess']
exclude: []
keep_files: ['.git','.svn']
gems: []
timezone: nil
encoding: utf-8

future: true
show_drafts: nil
limit_posts: 0
highlighter: pygments

relative_permalinks: true

permalink: date
paginate_path: 'page:num'
paginate: nil

markdown: kramdown
markdown_ext: markdown,mkdown,mkdn,mkd,md
textile_ext: textile

excerpt_separator: "\n\n"

defaults:
-
scope:
path: ""
values:
layout: "page"

kramdown:
auto_ids: true
footnote_nr: 1
entity_output: as_char
toc_levels: 1..6
smart_quotes: lsquo,rsquo,ldquo,rdquo
use_coderay: false

coderay:
coderay_wrap: div
coderay_line_numbers: inline
coderay_line_numbers_start: 1
coderay_tab_width: 4
coderay_bold_every: 10
coderay_css: style
49 changes: 49 additions & 0 deletions docs/_layouts/page.html
@@ -0,0 +1,49 @@
<!DOCTYPE html>
<html>

<head>
<meta charset='utf-8' />
<meta http-equiv="X-UA-Compatible" content="chrome=1" />
<meta name="description" content="Preprocessed Connectomes Project" />
<link rel="stylesheet" href="stylesheets/bib-publication-list.css"/>
<link rel="stylesheet" type="text/css" media="screen" href="stylesheets/stylesheet.css">
<script src="http://code.jquery.com/jquery-latest.min.js" type="text/javascript"></script>
<script src="javascripts/menu_script.js"></script>
<title>PCP Quality Assessment Protocol</title>
</head>

<body>

<div id="container">

<!-- HEADER -->
<header>
<!--<a id="forkme_banner" href="https://github.com/ccraddock/abide_preproc">View on GitHub</a>-->

<h1 id="project_title">PCP Quality Assessment Protocol</h1><br>
<div id='cssmenu'>
<ul>
<li><a href='index.html'>Overview</a></li>
<li class='active'><a href='publications.html'>Publications</a></li>
<li class='active'><a href='https://groups.google.com/d/forum/pcp_forum' target="_blank">Forum</a></li>
<li class='active'><a href='https://preprocessed-connectomes-project.github.io' target="_blank">PCP</a></li>
<li class='active'><a href='https://github.com/preprocessed-connectomes-project/quality-assessment-protocol' target="_blank">View on Github</a></li>

</ul>
</div>
</header>

<div id="main_content_wrap" class="outer">
<section id="main_content" class="inner">
{{ content }}
</section>
</div>

<!-- FOOTER -->
<footer class="inner">
<p>Published with <a href="http://pages.github.com">GitHub Pages</a></p>
</footer>

</div>
</body>
</html>
Binary file added docs/example_FD.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/example_mean_EPI.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/example_tSNR.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/functional_spatial_violins.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/bg_hr.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/blacktocat.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/icon_download.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/sprite_download.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit bd4658f

Please sign in to comment.