Skip to content
This repository has been archived by the owner on Oct 5, 2018. It is now read-only.

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 Block Dependency

plugins {
  id: 'org.ajoberstar.github-pages' version: '<version>'
}

Classic Plugin Dependency

apply plugin: 'org.ajoberstar.github-pages'

Configuration

githubPages {
  repoUri = '[email protected]: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.

Clone this wiki locally