This repository has been archived by the owner. 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 = '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.

You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.