Skip to content

Commit 6627f4a

Browse files
committed
Site updated at 2016-09-16 14:30:22 UTC
1 parent 5bf6d8b commit 6627f4a

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

Rakefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ task :deploy => [:check_git] do
1818

1919
puts "...git pull origin \"#{source_branch}\""
2020
system "git pull origin \"#{source_branch}\""
21-
# puts "...update plot schema"
22-
# system "curl https://api.plot.ly/v2/plot-schema?sha1=%27%27 > _data/plotschema.json && git add _data/plotschema.json && git commit -m \"Updated plotschema at #{Time.now.utc}\" && git push origin \"#{source_branch}\""
21+
puts "...update plot schema"
22+
system "python ./get_plotschema.py && git add _data/plotschema.json && git commit -m \"Updated plotschema at #{Time.now.utc}\" && git push origin \"#{source_branch}\""
2323
puts "...generate _site"
2424
system "jekyll build --verbose && git checkout \"#{deploy_branch}\" && git pull origin \"#{deploy_branch}\" && cp -r _site/* . && rm -rf _site/ && touch .nojekyll && git add . && git commit -m \"#{message}\" && git push origin \"#{deploy_branch}\""
2525
puts "...git checkout \"#{source_branch}\""

get_plotschema.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
"""
2+
Update _data/plotschema.json for rakefile.
3+
"""
4+
import requests
5+
6+
plotschema = requests.get('https://api.plot.ly/v2/plot-schema/?sha1=%27%27',
7+
headers={'plotly-client-platform': 'python'},
8+
auth=('plotly_docs', 'ikwqmjam2o')).content
9+
f = open('_data/plotschema.json', 'w')
10+
f.write(plotschema)

0 commit comments

Comments
 (0)