diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index f090925..a8bae56 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -9,7 +9,7 @@ jobs: - uses: actions/checkout@v1 - uses: olafurpg/setup-scala@v10 - name: Build docs - run: sbt laikaSite + run: sbt "project docs" laikaSite - name: Deploy to GH Pages uses: peaceiris/actions-gh-pages@v4 with: diff --git a/build.sbt b/build.sbt index 5601492..db78e4f 100644 --- a/build.sbt +++ b/build.sbt @@ -51,6 +51,58 @@ lazy val benchmarks = (project in file("benchmarks")) name := "benchmarks", ).enablePlugins(JmhPlugin) +lazy val docs = (project in file("docs")) + .dependsOn(core) + .enablePlugins(LaikaPlugin) + .settings( + name := "docs", + laikaTheme := { + import laika.ast.Path.Root + import laika.ast.{Image, ExternalTarget} + import laika.helium.config.* + import laika.helium.Helium + + Helium.defaults.site + .landingPage( + title = Some("Spark Fast Tests"), + subtitle = Some("Unit testing your Apache Spark application"), + latestReleases = Seq( + ReleaseInfo("Latest Stable Release", "1.0.0") + ), + license = Some("MIT"), + titleLinks = Seq( + VersionMenu.create(unversionedLabel = "Getting Started"), + LinkGroup.create( + IconLink.external("https://github.com/mrpowers-io/spark-fast-tests", HeliumIcon.github) + ) + ), + linkPanel = Some( + LinkPanel( + "Documentation", + TextLink.internal(Root / "about" / "README.md", "Spark Fast Tests") + ) + ), + projectLinks = Seq( + LinkGroup.create( + TextLink.internal(Root / "api" / "com" / "github" / "mrpowers" / "spark" / "fast" / "tests" / "index.html", "API (Scaladoc)") + ) + ), + teasers = Seq( + Teaser("Fast", "Handle small dataframes effectively and provide column assertions"), + Teaser("Flexible", "Works fine with scalatest, uTest, munit") + ) + ) + .build + }, + laikaIncludeAPI := true, + laikaExtensions ++= { + import laika.format.Markdown + import laika.config.SyntaxHighlighting + Seq(Markdown.GitHubFlavor, SyntaxHighlighting) + }, + Laika / sourceDirectories := Seq((ThisBuild / baseDirectory).value / "docs") + ) + credentials += Credentials(Path.userHome / ".sbt" / "sonatype_credentials") licenses := Seq("MIT" -> url("http://opensource.org/licenses/MIT")) @@ -66,49 +118,4 @@ publishMavenStyle := true publishTo := sonatypePublishToBundle.value -Global / useGpgPinentry := true - -enablePlugins(LaikaPlugin) - -import laika.format.Markdown -import laika.config.SyntaxHighlighting -import laika.ast.Path.Root -import laika.ast.{Image, ExternalTarget} -import laika.helium.config.* -import laika.helium.Helium - -laikaTheme := Helium.defaults.site - .landingPage( - title = Some("Spark Fast Tests"), - subtitle = Some("Unit testing your Apache Spark application"), - latestReleases = Seq( - ReleaseInfo("Latest Stable Release", "1.0.0") - ), - license = Some("MIT"), - titleLinks = Seq( - VersionMenu.create(unversionedLabel = "Getting Started"), - LinkGroup.create( - IconLink.external("https://github.com/mrpowers-io/spark-fast-tests", HeliumIcon.github) - ) - ), - linkPanel = Some( - LinkPanel( - "Documentation", - TextLink.internal(Root / "about" / "README.md", "Spark Fast Tests") - ) - ), - projectLinks = Seq( - LinkGroup.create( - TextLink.internal(Root / "api" / "com" / "github" / "mrpowers" / "spark" / "fast" / "tests" / "index.html", "API (Scaladoc)") - ) - ), - teasers = Seq( - Teaser("Fast", "Handle small dataframes effectively and provide column assertions"), - Teaser("Flexible", "Works fine with scalatest, uTest, munit") - ) - ) - .build - -laikaIncludeAPI := true -laikaExtensions ++= Seq(Markdown.GitHubFlavor, SyntaxHighlighting) -Laika / sourceDirectories := Seq((ThisBuild / baseDirectory).value / "docs") +Global / useGpgPinentry := true \ No newline at end of file diff --git a/docs/about/README.md b/docs/about/README.md deleted file mode 120000 index fe84005..0000000 --- a/docs/about/README.md +++ /dev/null @@ -1 +0,0 @@ -../../README.md \ No newline at end of file diff --git a/docs/about/README.md b/docs/about/README.md new file mode 100644 index 0000000..fe84005 --- /dev/null +++ b/docs/about/README.md @@ -0,0 +1 @@ +../../README.md \ No newline at end of file