This repository was archived by the owner on Oct 5, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 90
Github Pages Plugin
Andrew Oberstar edited this page Jun 5, 2016
·
1 revision
For publishing to a Github Pages site, apply the org.ajoberstar.github-pages plugin.
plugins {
id: 'org.ajoberstar.github-pages' version: '<version>'
}apply plugin: 'org.ajoberstar.github-pages'githubPages {
repoUri = 'git@github.com:username/repo.git' // defaults to this project's origin URI
targetBranch = 'some-branch' // defaults to gh-pages
pages {
from javadoc
// by default this will copy into the root of the gh-pages branch and delete any previous files
// customizing the destination will only delete files within that target dir
into "docs/${version}"
}
}The plugin adds a single publishGhPages task that will clone the
repository, copy in the files in the pages CopySpec, add all of
the changes, commit, and push back to the remote.