diff --git a/.gitignore b/.gitignore index e371383..f1ba265 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,7 @@ .bundle .sass-cache +_data/plugins +_data/themes _site/ *.swp pkg/ diff --git a/.travis.yml b/.travis.yml index cf80086..a303909 100644 --- a/.travis.yml +++ b/.travis.yml @@ -11,3 +11,18 @@ script: script/cibuild branches: only: - master +jobs: + include: + - + if: branch == master && type != pull_request && type != api + env: DEPLOY_BUILD=true + +deploy: + provider: pages + local-dir: _site + skip-cleanup: true + github-token: $GITHUB_TOKEN # Set in the settings page of your repository, as a secure variable + keep-history: true + on: + repo: jekyll/directory + branch: master diff --git a/_data/plugins.yml b/_data/entries.yml similarity index 59% rename from _data/plugins.yml rename to _data/entries.yml index 35285ef..761ab84 100644 --- a/_data/plugins.yml +++ b/_data/entries.yml @@ -1,3 +1,4 @@ +plugins: - grunt-jekyll - indii-jekyll-flickr - jekyll_indextank @@ -53,3 +54,37 @@ - related_posts-jekyll_plugin - rust_playground_highlight - singlepage-jekyll + +themes: +- alpha_jekyll_theme +- dimension_jekyll_theme +- editorial_jekyll_theme +- eventually_jekyll_theme +- forty_jekyll_theme +- fractal_jekyll_theme +- future_imperfect_jekyll_theme +- highlights_jekyll_theme +- hyperspace_jekyll_theme +- identity_jekyll_theme +- jekyll-swiss +- jekyll-theme-architect +- jekyll-theme-cayman +- jekyll-theme-dinky +- jekyll-theme-hacker +- jekyll-theme-leap-day +- jekyll-theme-merlot +- jekyll-theme-midnight +- jekyll-theme-minimal +- jekyll-theme-modernist +- jekyll-theme-slate +- jekyll-theme-tactile +- jekyll-theme-time-machine +- lens_jekyll_theme +- material-bliss-jekyll-theme +- minima +- multiverse_jekyll_theme +- phantom_jekyll_theme +- solid_state_jekyll_theme +- spectral_jekyll_theme +- stellar_jekyll_theme +- strata_jekyll_theme diff --git a/_data/themes.yml b/_data/themes.yml deleted file mode 100644 index 7a04f00..0000000 --- a/_data/themes.yml +++ /dev/null @@ -1,32 +0,0 @@ -- alpha_jekyll_theme -- dimension_jekyll_theme -- editorial_jekyll_theme -- eventually_jekyll_theme -- forty_jekyll_theme -- fractal_jekyll_theme -- future_imperfect_jekyll_theme -- highlights_jekyll_theme -- hyperspace_jekyll_theme -- identity_jekyll_theme -- jekyll-swiss -- jekyll-theme-architect -- jekyll-theme-cayman -- jekyll-theme-dinky -- jekyll-theme-hacker -- jekyll-theme-leap-day -- jekyll-theme-merlot -- jekyll-theme-midnight -- jekyll-theme-minimal -- jekyll-theme-modernist -- jekyll-theme-slate -- jekyll-theme-tactile -- jekyll-theme-time-machine -- lens_jekyll_theme -- material-bliss-jekyll-theme -- minima -- multiverse_jekyll_theme -- phantom_jekyll_theme -- solid_state_jekyll_theme -- spectral_jekyll_theme -- stellar_jekyll_theme -- strata_jekyll_theme diff --git a/script/cibuild b/script/cibuild index 367ae0b..5f99da2 100755 --- a/script/cibuild +++ b/script/cibuild @@ -2,3 +2,8 @@ script/fmt script/test script/scan + +if [[ -v $DEPLOY_BUILD ]]; then + script/segregate + bundle exec jekyll build +fi diff --git a/script/segregate b/script/segregate new file mode 100755 index 0000000..f937b63 --- /dev/null +++ b/script/segregate @@ -0,0 +1,23 @@ +#!/usr/bin/env ruby +# frozen_string_literal: true + +require "open-uri" +require "safe_yaml" + +def data_dir(*entries) + File.expand_path(File.join("..", "_data", *entries), __dir__) +end + +entries = SafeYAML.load_file(data_dir("entries.yml")) +entries.each do |type, list| + FileUtils.mkdir_p(data_dir(type)) + list.each do |item| + begin + data = open("https://rubygems.org/api/v1/gems/#{item}.yaml").read + File.open(data_dir("#{type}/#{item}.yml"), "wb") { |file| file.puts data } + rescue OpenURI::HTTPError + puts "'#{item}' does not seem to exist at rubygems.org" + next + end + end +end