Skip to content

Latest commit

 

History

History
70 lines (48 loc) · 2.17 KB

README.md

File metadata and controls

70 lines (48 loc) · 2.17 KB

GitHub Pages Maven Plugin

The GitHub Pages Maven plugin pushes resources, namely JavaDocs, to a GitHub repository automatically. This is useful for keeping your GitHub Pages up to date. While this plugin was designed to push API documentation, it can be re-purposed to automatically push anything to a repository branch.

Walker Crouse is an aspiring software engineer, amateur open source contributor, and starving college student. If you like my work, please consider donating a small amount so that I can continue to give these projects the time they deserve. Thank you.

Donate

Quickstart

  1. Run
mvn archetype:generate \
    -DarchetypeGroupId=se.walkercrou \
    -DarchetypeArtifactId=ghp-maven-archetype \
    -DarchetypeVersion=1.0 \
    -DgroupId=com.example \
    -DartifactId=hello-world
  1. Develop, Document, Repeat!

  2. Run mvn -P release and watch your documentation update online!

Advanced

Parameters

The following is a table of available parameters for this plugin

Name Description Default Required
branch The branch to push content in contentDir to gh-pages No
commitMessage The commit message to use when updating remote ... No
contentDir The directory to copy files from apidocs No
contentDestination The directory to copy files to from the contentDir root No

Command Line

Run this plugin on your project alone with

mvn ghp:update \
    -Dbranch=my-branch \
    -DcommitMessage="Custom commit message" \
    -DcontentDir=my-content \
    -DcontentDestination=docs \

Configuration

The following is a standard configuration for this plugin

<configuration>
    <branch>my-branch</branch>
    <commitMessage>Custom commit message</commitMessage>
    <contentDir>my-content</contentDir>
    <contentDestination>docs</contentDestination>
</configuration>