47 lines
1.3 KiB
Groovy
47 lines
1.3 KiB
Groovy
apply plugin: 'org.asciidoctor.convert'
|
|
apply plugin: 'org.ajoberstar.github-pages'
|
|
|
|
//artifactoryPublish.skip=true
|
|
sonarqube.skipProject=true
|
|
|
|
asciidoctor.dependsOn test
|
|
|
|
asciidoctor {
|
|
sources {
|
|
include 'index.adoc'
|
|
}
|
|
backends = ['html5', 'pdf']
|
|
attributes = [
|
|
doctype: 'book',
|
|
toc: 'left',
|
|
toclevels: '3',
|
|
numbered: '',
|
|
sectlinks: '',
|
|
sectanchors: '',
|
|
hardbreaks: '',
|
|
'release-version': project.releaseVersion,
|
|
'coreProjectDir': project(':swagger2markup').projectDir
|
|
]
|
|
}
|
|
|
|
publishGhPages.dependsOn asciidoctor
|
|
|
|
githubPages {
|
|
repoUri = 'https://github.com/Swagger2Markup/swagger2markup.git'
|
|
|
|
// use ENV GRGIT_USER
|
|
// use ENV GRGIT_PASS
|
|
// or org.ajoberstar.grgit.auth.username system property
|
|
// org.ajoberstar.grgit.auth.password system property
|
|
// see http://ajoberstar.org/grgit/grgit-authentication.html for details
|
|
credentials {
|
|
username = project.hasProperty('githubUser') ? project.githubUser : System.getenv('GITHUB_USER')
|
|
password = project.hasProperty('githubPassword') ? project.githubPassword : System.getenv('GITHUB_PASSWORD')
|
|
}
|
|
|
|
pages {
|
|
from file(asciidoctor.outputDir.path + '/html5')
|
|
into project.releaseVersion
|
|
}
|
|
}
|