diff --git a/.github/workflows/publish_microsite.yml b/.github/workflows/publish_microsite.yml new file mode 100644 index 000000000..9ed5c4ba1 --- /dev/null +++ b/.github/workflows/publish_microsite.yml @@ -0,0 +1,32 @@ +name: Publish Doc + +on: + push: + branches: + - main + paths: + - docs/** + +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Checkout current branch + uses: actions/checkout@v2 + with: + fetch-depth: 0 + - name: Setup Jekyll + run: | + gem install --install-dir $HOME/vendor/bundle jekyll + echo "GEM_HOME=$HOME/vendor/bundle" >> $GITHUB_ENV + echo "GEM_PATH=$HOME/vendor/bundle" >> $GITHUB_ENV + echo "$HOME/vendor/bundle/bin" >> $GITHUB_PATH + - name: Build docs + run: | + sbt docs/makeMicrosite + - name: publish + uses: peaceiris/actions-gh-pages@v3 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: ./docs/target/site + publish_branch: gh-pages diff --git a/README.md b/README.md index c11a5017a..fca3ddfc6 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -[![Build Status](https://api.travis-ci.org/typelevel/spire.png)](https://travis-ci.org/typelevel/spire/) +[![Continuous Integration](https://github.com/typelevel/spire/actions/workflows/ci.yml/badge.svg)](https://github.com/typelevel/spire/actions/workflows/ci.yml) [![Gitter](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/typelevel/spire?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) [![codecov.io](http://codecov.io/github/typelevel/spire/coverage.svg?branch=main)](http://codecov.io/github/typelevel/spire?branch=main) [![Maven Central](https://maven-badges.herokuapp.com/maven-central/org.typelevel/spire_2.12/badge.svg)](https://maven-badges.herokuapp.com/maven-central/org.typelevel/spire_2.11) diff --git a/build.sbt b/build.sbt index ce1373d52..fab074c12 100644 --- a/build.sbt +++ b/build.sbt @@ -50,19 +50,19 @@ inThisBuild( List( organization := "org.typelevel", homepage := Some(url("https://typelevel.org/spire/")), - licenses += ("MIT", url("http://opensource.org/licenses/MIT")), + licenses += ("MIT", url("https://opensource.org/licenses/MIT")), developers := List( Developer( "id_m", "Erik Osheim", "", - url("http://github.com/non/") + url("https://github.com/non/") ), Developer( "tixxit", "Tom Switzer", "", - url("http://github.com/tixxit/") + url("https://github.com/tixxit/") ) ) ) @@ -194,7 +194,6 @@ lazy val extras = crossProject(JSPlatform, JVMPlatform) .jvmSettings(commonJvmSettings: _*) .jsSettings(commonJsSettings: _*) .dependsOn(macros, platform, util, core, data) - lazy val docs = project .in(file("docs")) .enablePlugins(MicrositesPlugin) @@ -207,7 +206,12 @@ lazy val docs = project .settings(noPublishSettings) .enablePlugins(MdocPlugin) .settings( - mdocIn := (Compile / sourceDirectory).value / "mdoc" + mdocIn := (Compile / sourceDirectory).value / "mdoc", + mdocVariables := Map( + "VERSION" -> version.value + ), + // NOTE: disable link hygine to supress dead link warnings because mdoc does not go well with Jekyll + mdocExtraArguments ++= Seq("--no-link-hygiene") ) .settings(commonJvmSettings: _*) @@ -316,7 +320,7 @@ lazy val docSettings = Seq( micrositeHighlightTheme := "atom-one-light", micrositeHomepage := "https://typelevel.org/spire", micrositeBaseUrl := "spire", - micrositeDocumentationUrl := "/spire/api/spire/index.html", + micrositeDocumentationUrl := "https://www.javadoc.io/doc/org.typelevel/spire_2.13/latest/spire/index.html", micrositeDocumentationLabelDescription := "API Documentation", micrositeExtraMdFiles := Map( file("AUTHORS.md") -> ExtraMdFileConfig( @@ -347,6 +351,7 @@ lazy val docSettings = Seq( ), micrositeGithubOwner := "typelevel", micrositeGithubRepo := "spire", + micrositeTheme := "pattern", micrositePalette := Map( "brand-primary" -> "#5B5988", "brand-secondary" -> "#292E53", diff --git a/docs/src/main/mdoc/index.md b/docs/src/main/mdoc/index.md index 6f7984139..320741c9a 100644 --- a/docs/src/main/mdoc/index.md +++ b/docs/src/main/mdoc/index.md @@ -5,7 +5,7 @@ section: "Home" position: 0 --- -[![Build Status](https://api.travis-ci.org/typelevel/spire.png)](https://travis-ci.org/non/spire/) +[![Continuous Integration](https://github.com/typelevel/spire/actions/workflows/ci.yml/badge.svg)](https://github.com/typelevel/spire/actions/workflows/ci.yml) [![Gitter](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/typelevel/spire?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) [![codecov.io](https://codecov.io/github/typelevel/spire/coverage.svg?branch=main)](http://codecov.io/github/typelevel/spire?branch=main) [![Maven Central](https://maven-badges.herokuapp.com/maven-central/org.typelevel/spire_2.11/badge.svg)](https://maven-badges.herokuapp.com/maven-central/org.typelevel/spire_2.11) @@ -39,8 +39,8 @@ The [Spire mailing list](http://groups.google.com/group/typelevel/) is shared with other [Typelevel projects](http://typelevel.org). It is the place to go for announcements and discussions around Spire. When posting, place the word `[spire]` at the beginning of your subject. -We also have a guide on [contributing to Spire](CONTRIBUTING.md) as well -as a guide that provides information on [Spire's design](GUIDE.md). +We also have a guide on [contributing to Spire](./extra_md/contributing.html) as well +as a guide that provides information on [Spire's design](./guide.html). Spire has maintainers who are responsible for signing-off on and merging pull requests, and for helping to guide the direction of Spire: @@ -65,7 +65,7 @@ JVM and JS platforms. To get started with SBT, simply add the following to your `build.sbt` file: ``` -libraryDependencies += "org.typelevel" %% "spire" % "0.17.0" +libraryDependencies += "org.typelevel" %% "spire" % "@VERSION@" ``` (Previous to 0.14.0, Spire was published under *org.spire-math* @@ -129,7 +129,7 @@ introduces several new ones, all of which can be found in `spire.math`: * `Trilean` value class supporting three-valued logic * `FixedPoint` fractions with `Long` numerator and implicit denominator (in *extras*) -Detailed treatment of these types can be found in the [guide](GUIDE.md). +Detailed treatment of these types can be found in the [guide](./guide.html). ### Type Classes @@ -179,7 +179,7 @@ implicits which provide unary and infix operators for the type classes. The easiest way to use these is via a wildcard import of `spire.implicits._`. Detailed treatment of these type classes can be found in the -[guide](GUIDE.md). +[guide](./guide.md). ### Getting Started @@ -565,6 +565,6 @@ criticisms, and/or praise are welcome, especially from numerical analysts! ;) Copyright 2011-2017 Erik Osheim, Tom Switzer -A full list of contributors can be found in [AUTHORS.md](AUTHORS.md). +A full list of contributors can be found in [AUTHORS.md](./extra_md/authors.html). -The MIT software license is attached in the [COPYING](COPYING) file. +The MIT software license is attached in the [COPYING](./extra_md/copying) file.