Skip to content

Commit

Permalink
Build site
Browse files Browse the repository at this point in the history
  • Loading branch information
therealcisse committed Apr 11, 2021
1 parent 3b99117 commit 5bf7b4b
Show file tree
Hide file tree
Showing 3 changed files with 66 additions and 6 deletions.
46 changes: 44 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ jobs:
- run: sbt ++${{ matrix.scala }} test mimaReportBinaryIssues

- name: Compress target directories
run: tar cf targets.tar modules/sttp/target modules/http4s/target modules/scalacache/target modules/doobie/target modules/log4cats/target modules/akka-http/target modules/circe/target modules/http4s-client/target modules/redis/target modules/core/target target project/target
run: tar cf targets.tar modules/sttp/target modules/http4s/target modules/scalacache/target modules/doobie/target modules/log4cats/target modules/akka-http/target microsite/target modules/circe/target modules/http4s-client/target modules/redis/target modules/core/target target project/target

- name: Upload target directories
uses: actions/upload-artifact@v2
Expand Down Expand Up @@ -122,4 +122,46 @@ jobs:
- uses: olafurpg/setup-gpg@v3

- run: sbt ++${{ matrix.scala }} ci-release
- run: sbt ++${{ matrix.scala }} ci-release

microsite:
name: Microsite
strategy:
matrix:
os: [ubuntu-latest]
scala: [2.12.13]
java: [[email protected]]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout current branch (full)
uses: actions/checkout@v2
with:
fetch-depth: 0

- name: Setup Java and Scala
uses: olafurpg/setup-scala@v10
with:
java-version: ${{ matrix.java }}

- name: Cache sbt
uses: actions/cache@v2
with:
path: |
~/.sbt
~/.ivy2/cache
~/.coursier/cache/v1
~/.cache/coursier/v1
~/AppData/Local/Coursier/Cache/v1
~/Library/Caches/Coursier/v1
key: ${{ runner.os }}-sbt-cache-v2-${{ hashFiles('**/*.sbt') }}-${{ hashFiles('project/build.properties') }}

- name: Setup Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: 2.7

- name: Setup Jekyll
run: gem install jekyll -v 4.0.0

- name: Build the microsite
run: sbt ++${{ matrix.scala }} microsite/makeMicrosite
25 changes: 21 additions & 4 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,24 @@ ThisBuild / githubWorkflowEnv ++= List(
"SONATYPE_USERNAME"
).map(envKey => envKey -> s"$${{ secrets.$envKey }}").toMap

ThisBuild / githubWorkflowAddedJobs ++= Seq(
WorkflowJob(
"microsite",
"Microsite",
githubWorkflowJobSetup.value.toList ::: List(
WorkflowStep.Use(
UseRef.Public("ruby", "setup-ruby", "v1"),
params = Map("ruby-version" -> "2.7"),
name = Some("Setup Ruby")
),
WorkflowStep.Run(List("gem install jekyll -v 4.0.0"), name = Some("Setup Jekyll")),
WorkflowStep.Sbt(List("microsite/makeMicrosite"), name = Some("Build the microsite"))
),
javas = List(GraalVM11),
scalas = List(Scala_212)
)
)

inThisBuild(
List(
organization := "com.kubukoz",
Expand Down Expand Up @@ -173,10 +191,8 @@ def enumerateAnd(values: List[String]): String = {
} else values.mkString
}

/*
val microsite = project
.settings(
scalaVersion := Scala_212,
micrositeName := "sup",
micrositeDescription := "Functional healthchecks in Scala",
micrositeDocumentationUrl := "/guide",
Expand Down Expand Up @@ -206,13 +222,14 @@ val microsite = project
"SCALA_VERSIONS" -> enumerateAnd((crossScalaVersions in core).value.toList.map(dropMinor))
)
)
.enablePlugins(MdocPlugin)
.enablePlugins(MicrositesPlugin)
.enablePlugins(BuildInfoPlugin)
.dependsOn(allModules.map(x => x: ClasspathDep[ProjectReference]): _*)
*/

val sup =
project
.in(file("."))
.settings(commonSettings)
.settings(skip in publish := true, crossScalaVersions := List(), mimaPreviousArtifacts := Set.empty)
.aggregate((/* microsite :: */ allModules).map(x => x: ProjectReference): _*)
.aggregate((microsite :: allModules).map(x => x: ProjectReference): _*)
1 change: 1 addition & 0 deletions project/plugins.sbt
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
addSbtPlugin("com.geirsson" % "sbt-ci-release" % "1.5.7")
addSbtPlugin("com.47deg" % "sbt-microsites" % "1.3.0")
addSbtPlugin("org.scalameta" % "sbt-mdoc" % "2.2.19")
addSbtPlugin("com.eed3si9n" % "sbt-buildinfo" % "0.10.0")
addSbtPlugin("com.typesafe" % "sbt-mima-plugin" % "0.8.1")
addSbtPlugin("io.github.davidgregory084" % "sbt-tpolecat" % "0.1.16")
Expand Down

0 comments on commit 5bf7b4b

Please sign in to comment.