Skip to content

Commit

Permalink
Make path rendering os-independent
Browse files Browse the repository at this point in the history
  • Loading branch information
armanbilge committed Jun 19, 2023
1 parent 351bd6b commit 81efcde
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions site/src/main/scala/org/typelevel/sbt/TypelevelSitePlugin.scala
Original file line number Diff line number Diff line change
Expand Up @@ -168,12 +168,16 @@ object TypelevelSitePlugin extends AutoPlugin {
UseRef.Public("peaceiris", "actions-gh-pages", "v3.9.3"),
Map(
"github_token" -> s"$${{ secrets.GITHUB_TOKEN }}",
"publish_dir" -> (ThisBuild / baseDirectory)
.value
.toPath
.toAbsolutePath
.relativize((laikaSite / target).value.toPath)
.toString,
"publish_dir" -> {
val path = (ThisBuild / baseDirectory)
.value
.toPath
.toAbsolutePath
.relativize((laikaSite / target).value.toPath)

// os-independent path rendering ...
(0 until path.getNameCount).map(path.getName).mkString("/")
},
"keep_files" -> tlSiteKeepFiles.value.toString
),
name = Some("Publish site"),
Expand Down

0 comments on commit 81efcde

Please sign in to comment.