Skip to content

Commit

Permalink
Simplify ghpages publish task
Browse files Browse the repository at this point in the history
  • Loading branch information
pondzix committed Feb 18, 2022
1 parent 239f211 commit 7f6f688
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 26 deletions.
19 changes: 10 additions & 9 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,19 +12,20 @@ jobs:
- uses: actions/checkout@v2
- uses: coursier/cache-action@v6

# - name: Deploy scala-lru-map to Maven Central
# run: sbt ci-release
# env:
# PGP_PASSPHRASE: ${{ secrets.SONA_PGP_PASSPHRASE }}
# PGP_SECRET: ${{ secrets.SONA_PGP_SECRET }}
# SONATYPE_USERNAME: ${{ secrets.SONA_USER }}
# SONATYPE_PASSWORD: ${{ secrets.SONA_PASS }}

- name: Make site
run: sbt makeSite

- name: Publish ScalaDoc
uses: JamesIves/github-pages-deploy-action@v4.2.5
with:
branch: gh-pages
folder: target/site
folder: target/site
clean: false

# - name: Deploy scala-lru-map to Maven Central
# run: sbt ci-release
# env:
# PGP_PASSPHRASE: ${{ secrets.SONA_PGP_PASSPHRASE }}
# PGP_SECRET: ${{ secrets.SONA_PGP_SECRET }}
# SONATYPE_USERNAME: ${{ secrets.SONA_USER }}
# SONATYPE_PASSWORD: ${{ secrets.SONA_PASS }}
4 changes: 2 additions & 2 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ lazy val root = project
)
)
.settings(BuildSettings.publishSettings)
.settings(BuildSettings.ghPagesSettings)
.settings(BuildSettings.docSettings)
.settings(BuildSettings.coverageSettings)
.settings(BuildSettings.mimaSettings)
.enablePlugins(SiteScaladocPlugin, GhpagesPlugin, PreprocessPlugin)
.enablePlugins(SiteScaladocPlugin, PreprocessPlugin)
17 changes: 3 additions & 14 deletions project/BuildSettings.scala
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,9 @@ import com.typesafe.tools.mima.plugin.MimaKeys._
// Scoverage
import scoverage.ScoverageKeys._

// GHPages plugin
import com.typesafe.sbt.sbtghpages.GhpagesPlugin.autoImport._
import com.typesafe.sbt.site.SitePlugin.autoImport.{makeSite, siteSubdirName}
import com.typesafe.sbt.SbtGit.GitKeys.{gitBranch, gitRemoteRepo}
// Site plugin
import com.typesafe.sbt.site.SitePlugin.autoImport.siteSubdirName
import com.typesafe.sbt.site.SiteScaladocPlugin.autoImport._
import com.typesafe.sbt.site.preprocess.PreprocessPlugin.autoImport._

object BuildSettings {

Expand Down Expand Up @@ -72,15 +69,7 @@ object BuildSettings {
}
)

lazy val ghPagesSettings = Seq(
ghpagesPushSite := (ghpagesPushSite dependsOn makeSite).value,
ghpagesNoJekyll := false,
gitRemoteRepo := "https://github.com/snowplow-incubator/scala-lru-map.git",
gitBranch := Some("gh-pages"),
lazy val docSettings = Seq(
SiteScaladoc / siteSubdirName := s"${version.value}",
Preprocess / preprocessVars := Map("VERSION" -> version.value),
ghpagesCleanSite / excludeFilter := new FileFilter {
def accept(f: File) = true
}
)
}
1 change: 0 additions & 1 deletion project/plugins.sbt
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
addSbtPlugin("com.geirsson" % "sbt-ci-release" % "1.5.7")
addSbtPlugin("org.scoverage" % "sbt-coveralls" % "1.3.1")
addSbtPlugin("com.typesafe.sbt" % "sbt-ghpages" % "0.6.3")
addSbtPlugin("com.typesafe" % "sbt-mima-plugin" % "1.0.1")
addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.4.6")
addSbtPlugin("com.typesafe.sbt" % "sbt-site" % "1.4.1")
Expand Down

0 comments on commit 7f6f688

Please sign in to comment.