Skip to content

Instantly share code, notes, and snippets.

@OlegIlyenko
Created December 11, 2011 19:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save OlegIlyenko/1462166 to your computer and use it in GitHub Desktop.
Save OlegIlyenko/1462166 to your computer and use it in GitHub Desktop.
Publishing Pamflet with SBT and gh-pages (build.sbt)
import com.jsuereth.sbtsite.SiteKeys
// add all setting from the site plugin to the project
seq(site.settings: _*)
// add all setting from the ghpages plugin to the project
seq(ghpages.settings: _*)
// read-only git repository URI of the current project
git.remoteRepo := "git://github.com/OlegIlyenko/scaldi.git"
// I have chosen to publish my Scaladocs under the /api/... path
// instead of /api/latest/...
// so this line adds new target location for the generated Scaladocs
site.addMappingsToSiteDir(mappings in packageDoc in Compile, "api")
// The most interesting part. I'm adding pamflet output
// folder to the site mappings. Now ghpages plugin knows
// that files generated by pamflet plugin should also be
// published. Note, that PamfletKeys.write is actually
// hack in order to generate pamflet before site
// would be published.
SiteKeys.siteMappings <<=
(SiteKeys.siteMappings, PamfletKeys.write, PamfletKeys.output) map { (mappings, _, dir) =>
mappings ++ (dir ** "*.*" x relativeTo(dir))
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment