Skip to content

Commit 81efcde

Browse files
committed
Make path rendering os-independent
1 parent 351bd6b commit 81efcde

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

site/src/main/scala/org/typelevel/sbt/TypelevelSitePlugin.scala

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -168,12 +168,16 @@ object TypelevelSitePlugin extends AutoPlugin {
168168
UseRef.Public("peaceiris", "actions-gh-pages", "v3.9.3"),
169169
Map(
170170
"github_token" -> s"$${{ secrets.GITHUB_TOKEN }}",
171-
"publish_dir" -> (ThisBuild / baseDirectory)
172-
.value
173-
.toPath
174-
.toAbsolutePath
175-
.relativize((laikaSite / target).value.toPath)
176-
.toString,
171+
"publish_dir" -> {
172+
val path = (ThisBuild / baseDirectory)
173+
.value
174+
.toPath
175+
.toAbsolutePath
176+
.relativize((laikaSite / target).value.toPath)
177+
178+
// os-independent path rendering ...
179+
(0 until path.getNameCount).map(path.getName).mkString("/")
180+
},
177181
"keep_files" -> tlSiteKeepFiles.value.toString
178182
),
179183
name = Some("Publish site"),

0 commit comments

Comments
 (0)