Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Publish build artifacts to github page

I have project on GitHub which gets build by a Jenkins over at cloudbees.

When ever the build succeeds on the master branch I'd like to update the gh-pages branch and push it to github.

I'm using Gradle as the build tool.

Are there any Gradle and/or Jenkins plugins I can use for that?

like image 653
Jens Schauder Avatar asked Jun 16 '26 00:06

Jens Schauder


1 Answers

This blog post suggests using the "Git Publisher post-build action" in order to register the push action back to gh-pages branch.

In the case of the jdbc-persist project, the approach was to have three jenkins jobs:

  • one to generate a maven site and the javadoc
  • one to pull the latest gh-pages content, delete everything and replace it by the new updated maven site and javadoc
  • one to push back through the "Git Publisher post-build action"

Update August 2016: Simpler GitHub Pages publishing now allows to keep your page files in a subfolder of the same branch (no more gh-pages needed):

Now you can select a source in your repository settings and GitHub Pages will look for your content there.

So you could now update the content of a subfolder within the same branch instead of updating a separate branch.

like image 200
VonC Avatar answered Jun 17 '26 19:06

VonC