forked from cjug/cjug.org
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
58 lines (46 loc) · 1.42 KB
/
build.gradle
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
buildscript {
repositories {
mavenLocal()
mavenCentral()
jcenter()
}
dependencies {
classpath 'me.champeau.gradle:jbake-gradle-plugin:0.2'
classpath 'org.jbake:jbake-core:2.5.0'
classpath 'org.asciidoctor:asciidoctorj:1.5.2'
classpath 'org.freemarker:freemarker:2.3.19'
classpath 'org.pegdown:pegdown:1.4.2'
}
}
plugins {
id "org.ajoberstar.github-pages" version "1.5.1-rc.2"
}
apply plugin: 'me.champeau.jbake'
jbake {
clearCache = true
}
defaultTasks 'jbake'
def siteDir = "$buildDir/jbake"
githubPages {
// repoUri = '[email protected]:bobpaulin/bobpaulin.com.github.io.git'
repoUri = 'https://github.com/cjug/cjug.github.io.git'
targetBranch = 'master'
pages {
from(file("$siteDir")) {
into '.'
}
from file('CNAME')
}
credentials {
// Use token stored as property for local builds and a travis encrypted key (in 'GH_TOKEN') for Travis builds
username = project.hasProperty('msgGithubAccessToken') ? msgGithubAccessToken : System.getenv('GH_TOKEN')
// Apparently password can't be null or '' if githubPages to use "hardcoded" credential in the username.
password = '\n'
}
}
publishGhPages.dependsOn jbake
task publish(dependsOn: publishGhPages, group: 'render',
description: "Publishes buildDir to Github Pages on 'master' branch")
task wrapper(type: Wrapper) {
gradleVersion = '2.4'
}