Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build site #303

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
26 changes: 22 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 All @@ -195,6 +211,7 @@ val microsite = project
"de.heikoseeberger" %% "akka-http-circe" % "1.29.1"
),
skip in publish := true,
mimaPreviousArtifacts := Set.empty,
buildInfoPackage := "sup.buildinfo",
micrositeAnalyticsToken := "UA-55943015-9",
buildInfoKeys := Seq[BuildInfoKey](lastStableVersion),
Expand All @@ -206,13 +223,14 @@ val microsite = project
"SCALA_VERSIONS" -> enumerateAnd((crossScalaVersions in core).value.toList.map(dropMinor))
)
)
.enablePlugins(MdocPlugin)
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

huh, why wasn't this here before? o.O

.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