Skip to content

Commit 1a189a1

Browse files
committed
Fix cross-platform duplicate .well-known path handling
1 parent f5e38cf commit 1a189a1

2 files changed

Lines changed: 45 additions & 39 deletions

File tree

.github/workflows/ci.yml

Lines changed: 35 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,35 @@
1-
name: Continuous Integration
2-
3-
on:
4-
pull_request:
5-
branches: ['**']
6-
push:
7-
branches: ['main']
8-
9-
jobs:
10-
build:
11-
name: Build and Test
12-
runs-on: ubuntu-latest
13-
steps:
14-
- uses: actions/checkout@v6
15-
- uses: actions/setup-java@v5
16-
with:
17-
distribution: temurin
18-
java-version: 25
19-
- uses: coursier/cache-action@v6
20-
- uses: VirtusLab/scala-cli-setup@main
21-
with:
22-
scala-cli-version: 1.12.2
23-
- run: scala-cli fmt --check .
24-
- run: scala-cli --server=false build.scala
25-
- if: github.event_name != 'pull_request'
26-
uses: peaceiris/actions-gh-pages@v4.0.0
27-
with:
28-
github_token: ${{ secrets.GITHUB_TOKEN }}
29-
publish_dir: target
30-
cname: typelevel.org
1+
name: Continuous Integration
2+
3+
on:
4+
pull_request:
5+
branches: ['**']
6+
push:
7+
branches: ['main']
8+
9+
jobs:
10+
build:
11+
name: Build and Test
12+
strategy:
13+
matrix:
14+
os: [ubuntu-latest, windows-latest]
15+
runs-on: ${{ matrix.os }}
16+
steps:
17+
- uses: actions/checkout@v6
18+
- uses: actions/setup-java@v5
19+
with:
20+
distribution: temurin
21+
java-version: 25
22+
- uses: coursier/cache-action@v6
23+
- uses: VirtusLab/scala-cli-setup@main
24+
with:
25+
scala-cli-version: 1.12.2
26+
- run: scala-cli fmt --check .
27+
- run: scala-cli --server=false build.scala
28+
env:
29+
JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF-8
30+
- if: matrix.os == 'ubuntu-latest' && github.event_name != 'pull_request'
31+
uses: peaceiris/actions-gh-pages@v4.0.0
32+
with:
33+
github_token: ${{ secrets.GITHUB_TOKEN }}
34+
publish_dir: target
35+
cname: typelevel.org

build.scala

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -86,8 +86,9 @@ object LaikaBuild {
8686
).toURL()
8787

8888
InputTree[IO]
89+
// Exclude `.well-known` from the main `src` scan to avoid duplicates; it is added explicitly below for consistent cross-platform behavior.
90+
.withFileFilter(FileFilter.lift(_.name == ".well-known"))
8991
.addDirectory("src")
90-
// Laika skips .dotfiles by default
9192
.addDirectory("src/.well-known", Path.Root / ".well-known")
9293
.addInputStream(
9394
IO.blocking(securityPolicy.openStream()),
@@ -364,12 +365,12 @@ object LaikaCustomizations {
364365
output.resource.use { os =>
365366
Async[F].blocking {
366367
val pw = new java.io.PrintWriter(os)
367-
pw.print("""|<?xml version="1.0" encoding="UTF-8" ?>
368-
|<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
369-
|<channel>
370-
|<title>Typelevel Blog</title>
371-
|<link>https://typelevel.org/blog/</link>
372-
|<description>The Typelevel Blog RSS Feed</description>
368+
pw.print("""|<?xml version="1.0" encoding="UTF-8" ?>
369+
|<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
370+
|<channel>
371+
|<title>Typelevel Blog</title>
372+
|<link>https://typelevel.org/blog/</link>
373+
|<description>The Typelevel Blog RSS Feed</description>
373374
|""".stripMargin)
374375

375376
posts
@@ -378,8 +379,8 @@ object LaikaCustomizations {
378379
pw.print(doc.content)
379380
}
380381

381-
pw.print("""|</channel>
382-
|</rss>
382+
pw.print("""|</channel>
383+
|</rss>
383384
|""".stripMargin)
384385
pw.flush()
385386
}

0 commit comments

Comments
 (0)