This is an automated email from the ASF dual-hosted git repository. ieugen pushed a commit to branch JAMES-3226-site-build in repository https://gitbox.apache.org/repos/asf/james-site.git
The following commit(s) were added to refs/heads/JAMES-3226-site-build by this push: new 03185fc [JAMES-3226] Added .asf.yaml file to output. 03185fc is described below commit 03185fc795eede1850ae5507f44f78a28b97b0cd Author: Eugen Stan <eu...@ieugen.ro> AuthorDate: Tue Jul 7 16:01:25 2020 +0300 [JAMES-3226] Added .asf.yaml file to output. * Inclomplete publish with git-plugin --- doc-sites/build.gradle | 32 +++++++++++++++++++++++++++----- doc-sites/src/main/asf/.asf.yaml | 9 +++++++++ 2 files changed, 36 insertions(+), 5 deletions(-) diff --git a/doc-sites/build.gradle b/doc-sites/build.gradle index 1aff74c..69fded0 100644 --- a/doc-sites/build.gradle +++ b/doc-sites/build.gradle @@ -1,6 +1,8 @@ plugins { id 'base' - id "com.github.node-gradle.node" version "2.2.4" + id 'com.github.node-gradle.node' version '2.2.4' + id 'org.ajoberstar.grgit' version '4.0.2' + id 'org.ajoberstar.git-publish' version '2.1.3' } node { @@ -9,14 +11,34 @@ node { download = true } +def siteOutputDir = "$buildDir/site" + +gitPublish { + repoDir = file(siteOutputDir) + branch = 'asf-staging-test' +} + task generateDocs(type: NpxTask) { dependsOn npmInstall + // dependsOn gitPublishReset + inputs.files('package.json', 'package-lock.json', 'antora-playbook.yml') - inputs.dir(fileTree("node_modules").exclude(".cache")) - outputs.dir('build/site') + inputs.dir(fileTree('node_modules').exclude('.cache')) + outputs.dir(gitPublish.repoDir) command = 'antora' - args = ['antora-playbook.yml'] + args = ['antora-playbook.yml', '--to-dir', siteOutputDir ] +} + +task copySomeFiles(type: Copy) { + dependsOn generateDocs + from 'src/main/asf' + into siteOutputDir +} + +task buildSite() { + dependsOn generateDocs, copySomeFiles } -tasks.build.dependsOn generateDocs \ No newline at end of file +tasks.build.dependsOn buildSite +tasks.gitPublishCommit.dependsOn buildSite \ No newline at end of file diff --git a/doc-sites/src/main/asf/.asf.yaml b/doc-sites/src/main/asf/.asf.yaml new file mode 100644 index 0000000..4532579 --- /dev/null +++ b/doc-sites/src/main/asf/.asf.yaml @@ -0,0 +1,9 @@ +# +# See documentation for the options here +# https://cwiki.apache.org/confluence/display/INFRA/git+-+.asf.yaml+features +# + +# Staging and publishing profile for yourproject-website.git: +staging: + profile: ~ + whoami: asf-staging \ No newline at end of file