Created
April 10, 2010 06:35
-
-
Save ananthakumaran/361873 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<distributionManagement> | |
<site> | |
<id>maven-demo</id> | |
<url>file:///${basedir}/../temp</url> | |
</site> | |
</distributionManagement> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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