Skip to content

Commit

Permalink
Use git lfs in the pages build.
Browse files Browse the repository at this point in the history
  • Loading branch information
zainab-ali committed Nov 7, 2024
1 parent ef1506e commit c003632
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 1 deletion.
1 change: 1 addition & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -317,6 +317,7 @@ jobs:
uses: actions/checkout@v4
with:
fetch-depth: 0
lfs: true

- name: Setup Java (temurin@11)
id: setup-java-temurin-11
Expand Down
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,13 @@ yarn start

If you're only changing `.md` files, you can run `sbt '~docs/mdoc'`.

If you want to view images, such as the logo, use `git lfs` to check them out:

```bash
git lfs install --local
git lfs pull
```

Note that the site will look a tiny bit different because to build a versioned website we have some machinery in the script running on CI - but you don't have to worry about that.

### PR Guidelines
Expand Down
16 changes: 15 additions & 1 deletion build.sbt
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import _root_.cats.syntax.all.*
import laika.helium.config.TextLink
import laika.helium.config.ReleaseInfo
import laika.helium.config.HeliumIcon
Expand All @@ -9,7 +10,6 @@ import laika.ast.Image
import laika.config.LinkValidation
import org.typelevel.sbt.site.TypelevelSiteSettings
import sbt.librarymanagement.Configurations.ScalaDocTool

// https://typelevel.org/sbt-typelevel/faq.html#what-is-a-base-version-anyway
ThisBuild / tlBaseVersion := "0.0" // your current series x.y

Expand Down Expand Up @@ -187,6 +187,20 @@ lazy val docsOutput = crossProject(JVMPlatform)
lazy val docs = project
.in(file("site"))
.enablePlugins(TypelevelSitePlugin)
.settings(
ThisBuild / githubWorkflowAddedJobs ~= {
// Checkout site assets from LFS
_.map {
case job: WorkflowJob if job.name === "Generate Site" =>
job.withSteps(job.steps.map {
case step: WorkflowStep.Use
if step.name === Some("Checkout current branch (full)") =>
step.updatedParams("lfs", "true")
case other => other
})
case other => other
}
})
.dependsOn(
core.jvm,
framework.jvm,
Expand Down

0 comments on commit c003632

Please sign in to comment.