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

Add site #71

Merged
merged 10 commits into from
Nov 15, 2023
Merged
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
Binary file added .additional-certs/GTS_CA_1P5.cer
Binary file not shown.
Binary file not shown.
21 changes: 21 additions & 0 deletions .github/link-validator.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
// config for https://github.com/ennru/site-link-validator/
site-link-validator {
root-dir = "./docs/target/site/"
# relative to `root-dir`
start-file = "docs/akka-dependencies/snapshot/index.html"

# Resolves URLs with the given prefix as local files instead
link-mappings = [
]

ignore-missing-local-files-regex = ""

ignore-prefixes = [
# GitHub will block with "429 Too Many Requests"
"https://github.com/"
"https://repo.akka.io/"
]

non-https-whitelist = [
]
}
2 changes: 1 addition & 1 deletion .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
jobs:
check:
name: Check
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v2
Expand Down
38 changes: 38 additions & 0 deletions .github/workflows/link-validator.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Link Validator

on:
pull_request:
schedule:
- cron: '0 6 * * 1'
workflow_dispatch:

permissions:
contents: read

jobs:
validate-links:
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v3.1.0

- name: Cache Coursier cache
uses: coursier/cache-action@v6.4.1

- name: Set up JDK 11
uses: coursier/setup-action@v1.3.0
with:
jvm: temurin:1.17.0.5
apps: cs

- name: Add additional root certs
run: |
JAVA_HOME=$(cs java-home --jvm adopt:11)
keytool -importcert -trustcacerts -storepass changeit -alias sectigo -keystore $JAVA_HOME/lib/security/cacerts -file .additional-certs/Sectigo_RSA_Domain_Validation_Secure_server_CA.cer
keytool -importcert -trustcacerts -storepass changeit -alias gts_ca_1p5 -keystore $JAVA_HOME/lib/security/cacerts -file .additional-certs/GTS_CA_1P5.cer

- name: sbt site
run: sbt docs/makeSite

- name: Run Link Validator
run: cs launch net.runne::site-link-validator:0.2.3 -- .github/link-validator.conf
25 changes: 24 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:
jobs:
publish:
name: Publish
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v2
Expand Down Expand Up @@ -41,3 +41,26 @@ jobs:
PUBLISH_USER: ${{ secrets.PUBLISH_USER }}
PUBLISH_PASSWORD: ${{ secrets.PUBLISH_PASSWORD }}
run: sbt +publishSigned

documentation:
name: Documentation
runs-on: ubuntu-22.04
if: github.event.repository.fork == false
steps:
- name: Checkout
uses: actions/checkout@v3.1.0

- name: Cache Coursier cache
uses: coursier/cache-action@v6.4.0

- name: Set up JDK 17
uses: coursier/setup-action@v1.3.0
with:
jvm: temurin:1.17.0.5
apps: cs

- name: sbt site
run: sbt docs/makeSite

- name: Run Link Validator
run: cs launch net.runne::site-link-validator:0.2.3 -- scripts/link-validator.conf
58 changes: 54 additions & 4 deletions .scalafmt.conf
Original file line number Diff line number Diff line change
@@ -1,4 +1,54 @@
docstrings = JavaDoc
align.preset = more
maxColumn = 120
rewrite.rules = [RedundantParens, SortImports, AvoidInfix]
version = 2.1.0

style = defaultWithAlign

docstrings = JavaDoc
indentOperator = spray
maxColumn = 120
lineEndings = preserve
rewrite.rules = [RedundantParens, SortImports, AvoidInfix]
unindentTopLevelOperators = true
align.tokens = [{code = "=>", owner = "Case"}]
align.openParenDefnSite = false
align.openParenCallSite = false
optIn.breakChainOnFirstMethodDot = false
optIn.configStyleArguments = false
danglingParentheses = false
spaces.inImportCurlyBraces = true
rewrite.neverInfix.excludeFilters = [
and
min
max
until
to
by
eq
ne
"should.*"
"contain.*"
"must.*"
in
ignore
be
taggedAs
thrownBy
synchronized
have
when
size
only
noneOf
oneElementOf
noElementsOf
atLeastOneElementOf
atMostOneElementOf
allElementsOf
inOrderElementsOf
theSameElementsAs
theSameElementsInOrderAs
]
rewriteTokens = {
"⇒": "=>"
"→": "->"
"←": "<-"
}
57 changes: 40 additions & 17 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,7 @@ ThisBuild / resolvers ++= sys.env
.map { repo =>
Seq(
"lightbend-commercial-mvn".at(repo),
Resolver.url(
"lightbend-commercial-ivy",
url(repo)
)(Resolver.ivyStylePatterns)
)
Resolver.url("lightbend-commercial-ivy", url(repo))(Resolver.ivyStylePatterns))
}
.getOrElse(Seq.empty)

Expand All @@ -27,17 +23,13 @@ lazy val `akka-dependencies` =
name := "akka-dependencies",
description := s"${description.value} (depending on Scala ${CrossVersion.binaryScalaVersion(scalaVersion.value)})",
homepage := Some(url("https://akka.io/")),
licenses := Seq(
("BUSL-1.1", url("https://raw.githubusercontent.com/lightbend/akka-dependencies/v10.22.0/LICENSE"))
),
licenses := Seq(("BUSL-1.1", url("https://raw.githubusercontent.com/akka/akka-dependencies/v23.10.0/LICENSE"))),
developers := List(
Developer(
"akka-contributors",
"Akka Contributors",
"akka.official@gmail.com",
url("https://github.com/lightbend/akka-dependencies/graphs/contributors")
)
),
Developer(
"akka-contributors",
"Akka Contributors",
"akka.official@gmail.com",
url("https://github.com/akka/akka-dependencies/graphs/contributors"))),
// append -SNAPSHOT to version when isSnapshot
ThisBuild / dynverSonatypeSnapshots := true,
bomIncludeModules := akka ++
Expand All @@ -61,8 +53,39 @@ lazy val `akka-dependencies` =
}
},
publishLocalConfiguration := publishLocalConfiguration.value.withOverwrite(true),
publishM2Configuration := publishM2Configuration.value.withOverwrite(true)
)
publishM2Configuration := publishM2Configuration.value.withOverwrite(true))
.aggregate(docs)

lazy val docs = project
.enablePlugins(SitePreviewPlugin, AkkaParadoxPlugin, ParadoxSitePlugin, PublishRsyncPlugin)
.settings(
name := "Akka Dependencies",
scalaVersion := Versions.Scala213,
previewPath := (Paradox / siteSubdirName).value,
Paradox / siteSubdirName := s"docs/akka-dependencies/${projectInfoVersion.value}",
projectInfoVersion := (if (isSnapshot.value) "snapshot" else version.value),
publish / skip := true,
Copy link
Member

Choose a reason for hiding this comment

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

This does the trick for build tool Scala versions:

Suggested change
publish / skip := true,
publish / skip := true,
scalaVersion = "2.13.12",

paradoxProperties ++= Map(
"akka-scala-2.13.version" -> "2.13",
"akka-scala-3.version" -> Dependencies.Versions.Scala3,
"akka-dependencies.version" -> version.value,
"akka-dependencies.major-version" -> Dependencies.Versions.AkkaDependenciesMinor,
"akka.version" -> Dependencies.Versions.Akka,
"akka-http.version" -> Dependencies.Versions.AkkaHttp,
"akka-grpc.version" -> Dependencies.Versions.AkkaGrpc,
"akka-management.version" -> Dependencies.Versions.AkkaManagement,
"akka-diagnostics.version" -> Dependencies.Versions.AkkaDiagnostics,
"akka-projections.version" -> Dependencies.Versions.AkkaProjections,
"akka-persistence-cassandra.version" -> Dependencies.Versions.AkkaPersistenceCassandra,
"akka-persistence-jdbc.version" -> Dependencies.Versions.AkkaPersistenceJdbc,
"akka-persistence-r2dbc.version" -> Dependencies.Versions.AkkaPersistenceR2dbc,
"alpakka.version" -> Dependencies.Versions.Alpakka,
"alpakka-kafka.version" -> Dependencies.Versions.AlpakkaKafka),
paradoxRoots := List("index.html"),
Compile / paradoxGroups := Map("BuildTool" -> Seq("sbt", "Maven", "Gradle")),
resolvers += Resolver.jcenterRepo,
publishRsyncArtifacts += makeSite.value -> "www/",
publishRsyncHost := "akkarepo@gustav.akka.io")

addCommandAlias("checkBom", ";scalafmtSbtCheck;+akka-dependencies/billOfMaterials:publishM2")
addCommandAlias("checkPullBom", ";scalafmtSbtCheck;+update;+akka-dependencies/billOfMaterials:publishM2")
Loading
Loading