File tree Expand file tree Collapse file tree 2 files changed +18
-0
lines changed Expand file tree Collapse file tree 2 files changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -4,6 +4,12 @@ node_js: "5"
4
4
os :
5
5
- linux
6
6
7
+ # So we can compile markdown
8
+ addons :
9
+ apt :
10
+ packages :
11
+ - pandoc
12
+
7
13
# For deploying to Github pages
8
14
env :
9
15
global :
Original file line number Diff line number Diff line change @@ -5,11 +5,23 @@ require('../shelljs/0.6.0');
5
5
// This script is typically run by the CI
6
6
// GH_TOKEN must be an environmental variable
7
7
8
+ var markdownFile = __dirname + '/index.md' ;
9
+
8
10
set ( '-e' ) ;
9
11
if ( env . GH_TOKEN ) {
12
+ console . log ( 'Compiling markdown to HTML' ) ;
13
+
14
+ rm ( '-rf' , 'build' ) ;
15
+ mkdir ( 'build' ) ;
16
+ exec ( 'pandoc index.md -f markdown -t html -s -o build/index.html' ) ;
17
+
10
18
console . log ( 'Deploying to Github pages' ) ;
19
+ cd ( 'build' ) ;
20
+
11
21
exec ( 'git config user.name "Travis CI"' ) ;
12
22
exec ( 'git config user.email "ntfschr@gmail.com"' ) ;
23
+
24
+ exec ( 'git init' ) ;
13
25
exec ( 'git add .' ) ;
14
26
exec ( 'git commit -m "Deploy to Github pages"' ) ;
15
27
var ret = exec ( 'git push --force --quiet "https://${GH_TOKEN}@github.com/shelljs/benchmarks.git" master:gh-pages' ) . code ;
You can’t perform that action at this time.
0 commit comments