Nav
You are viewing an older version of this section. Click here to navigate to the latest version.

Uploading documentation to GitHub

The DevKit includes a special Maven plugin that uploads the generated documentation to GitHub, taking advantage of GitHub Pages. This plugin can be executed by:

 Federicos-MacBook-Pro:myproject federico$ mvn mule-devkit:github-upload-doc -Dgithub.userName=MY_USER -Dgithub.password=MY_PASSWORD

Where MY_USER and MY_PASSWORD are valid GitHub credentials and MY_USER has write access to the repository.

IMPORTANT: the special branch for GitHub Pages has to be created before running the github-upload-mojo for the first time. For instructions on how to create de GitHub Pages click here

You also need to configure SCM (Software Configuration Management) tags in your maven pom.xml file:


              
           
1
2
3
4
5
6
7
8
9
<scm>
   <connection>
       scm:git:git://github.com:mulesoft/{YOUR-PROJECT-NAME}.git
   </connection>
   <developerConnection>
       scm:git:git@github.com:mulesoft/{YOUR-PROJECT-NAME}.git
   </developerConnection>
   <url>http://github.com/mulesoft/{YOUR-PROJECT-NAME}</url>
</scm>

You can check more information on how to do this here

To have a sense how the generated documentation will be displayed in GitHub, have a look at the SalesForce Connector docs.

Configuring the Mojo

The mojo accepts the following parameters:

Name Type Description

message

String

The commit message to use. Default value is: "Updating documentation"

userName

String

User name for authentication. Required

password

String

Password for authentication. Required

host

String

Host for API calls. Default value is: "api.github.com"

retryCount

int

In case of failure of the mojo, how many times retry the execution. Default value is: 3

sleepTime

int

The number of milliseconds to wait before retrying. Default value is: 10000

failBuild

boolean

Whether to fail this mojo when it is not possible to upload the blob to GitHub. Default value is: false

In this topic: