forked from parkyourprofits/parkprofits
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
39 lines (29 loc) · 950 Bytes
/
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
plugins {
id "com.monochromeroad.s3sync" version "0.10"
id "org.ajoberstar.github-pages" version "1.5.1-rc.2"
id "org.aim42.htmlSanityCheck" version "0.9.3"
}
import com.monochromeroad.gradle.plugin.aws.s3.S3Sync
def siteDir = 'src/html'
def destBucket = 'www.parkyourprofits.com'
githubPages {
repoUri = 'https://github.com/patrickdugan/parkprofits.git'
targetBranch = 'gh-pages'
pages {
from siteDir
}
}
task publish(type: S3Sync) {
description = "Publishes (synchronizes) \"${siteDir}\" to S3 bucket named \"${destBucket}\"."
accessKey parkAwsAccessKey
secretKey parkAwsSecretKey
configFile "jets3t.properties"
acl = com.monochromeroad.gradle.plugin.aws.s3.ACL.PublicRead
from siteDir
into destBucket
}
task publishGh(dependsOn: publishGhPages,
description: "Publishes \"${siteDir}\" to Github Pages on 'targetBranch'")
htmlSanityCheck {
sourceDir = new File( "$siteDir" )
}