Skip to content

Instantly share code, notes, and snippets.

@ananthakumaran
Created April 10, 2010 06:35
Show Gist options
  • Save ananthakumaran/361873 to your computer and use it in GitHub Desktop.
Save ananthakumaran/361873 to your computer and use it in GitHub Desktop.
<distributionManagement>
<site>
<id>maven-demo</id>
<url>file:///${basedir}/../temp</url>
</site>
</distributionManagement>
task :site do
temp = "../temp"
puts `git clone -l -s -b gh-pages . #{temp}`
if system("mvn site-deploy ")
puts `cd #{temp} && git add -A && git commit -m "deploying site" && git push origin gh-pages`
puts `git push origin gh-pages`
puts " site deployed successfully "
else
puts " site could not be deployed "
end
puts `rm -r #{temp}`
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment