-
Notifications
You must be signed in to change notification settings - Fork 53
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add material theme to paradox * Add paradox site publish on release * Add sbt-site and sbt-ghpages
- Loading branch information
Showing
5 changed files
with
52 additions
and
9 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -147,6 +147,14 @@ jobs: | |
|
||
- run: sbt ++${{ matrix.scala }} release | ||
|
||
- run: sbt ++${{ matrix.scala }} docs/makeSite | ||
|
||
- uses: JamesIves/[email protected] | ||
with: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
BRANCH: gh-pages | ||
FOLDER: docs/target/site | ||
|
||
build-docs: | ||
name: Build docs | ||
strategy: | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
docs/src/main/paradox/index.md | ||
docs/src/index.md |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -59,6 +59,20 @@ ThisBuild / githubWorkflowAddedJobs ++= Seq( | |
) | ||
) | ||
|
||
ThisBuild / githubWorkflowPublish ++= Seq( | ||
WorkflowStep.Sbt(List("docs/makeSite")), | ||
WorkflowStep.Use( | ||
"JamesIves", | ||
"github-pages-deploy-action", | ||
"3.7.1", | ||
params = Map( | ||
"GITHUB_TOKEN" -> "${{ secrets.GITHUB_TOKEN }}", | ||
"BRANCH" -> "gh-pages", | ||
"FOLDER" -> "docs/target/site" | ||
) | ||
) | ||
) | ||
|
||
ThisBuild / homepage := Some(url("https://github.com/typelevel/cats-parse")) | ||
|
||
ThisBuild / scmInfo := Some( | ||
|
@@ -79,19 +93,30 @@ lazy val root = project | |
.settings(scalaVersion := "2.13.4") | ||
|
||
lazy val docs = project | ||
.enablePlugins(ParadoxPlugin, MdocPlugin, NoPublishPlugin) | ||
.enablePlugins( | ||
ParadoxSitePlugin, | ||
ParadoxMaterialThemePlugin, | ||
MdocPlugin, | ||
NoPublishPlugin, | ||
GhpagesPlugin | ||
) | ||
.settings( | ||
name := "paradox-docs", | ||
libraryDependencies += jawnAst, | ||
paradoxTheme := Some(builtinParadoxTheme("generic")), | ||
paradoxProperties in Compile ++= Map( | ||
"empty" -> "", | ||
"version" -> version.value | ||
), | ||
githubWorkflowArtifactUpload := false, | ||
mdocIn := (paradox / sourceDirectory).value, | ||
paradox / sourceManaged := mdocOut.value, | ||
Compile / paradox := (Compile / paradox).dependsOn(mdoc.toTask("")).value | ||
git.remoteRepo := "[email protected]:typelevel/cats-parse.git", | ||
mdocIn := (Compile / baseDirectory).value / "src", | ||
Compile / paradox / sourceDirectory := mdocOut.value, | ||
Compile / paradox := (Compile / paradox).dependsOn(mdoc.toTask("")).value, | ||
Compile / paradoxMaterialTheme := ParadoxMaterialTheme() | ||
.withColor("red", "orange") | ||
.withFont("Ubuntu", "Ubuntu Mono") | ||
.withCopyright("Copyright (c) 2020 Typelevel") | ||
.withRepository(uri("https://github.com/typelevel/cats-parse")) | ||
) | ||
.dependsOn(coreJVM, bench) | ||
|
||
|
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
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