未验证 提交 b74c7780 编写于 作者: M Milad Khajavi 提交者: GitHub

Add Scaladoc support (#724)

上级 bbb7f9b6
......@@ -10,7 +10,31 @@ name: Website
push:
branches:
- master
pull_request: {}
jobs:
build:
name: Build and Test
runs-on: ubuntu-latest
if: ${{ github.event_name == 'pull_request' }}
steps:
- name: Git Checkout
uses: actions/checkout@v3.3.0
with:
fetch-depth: '0'
- name: Setup Scala
uses: actions/setup-java@v3.9.0
with:
distribution: temurin
java-version: 17
check-latest: true
- name: Check if the README file is up to date
run: sbt docs/checkReadme
- name: Check if the site workflow is up to date
run: sbt docs/checkGithubWorkflow
- name: Check artifacts build process
run: sbt +publishLocal
- name: Check website build process
run: sbt docs/clean; sbt docs/buildWebsite
publish-docs:
name: Publish Docs
runs-on: ubuntu-latest
......@@ -21,7 +45,7 @@ jobs:
with:
fetch-depth: '0'
- name: Setup Scala
uses: actions/setup-java@v3.6.0
uses: actions/setup-java@v3.9.0
with:
distribution: temurin
java-version: 17
......@@ -38,6 +62,7 @@ jobs:
generate-readme:
name: Generate README
runs-on: ubuntu-latest
if: ${{ (github.event_name == 'push') || ((github.event_name == 'release') && (github.event_name == 'published')) }}
steps:
- name: Git Checkout
uses: actions/checkout@v3.3.0
......@@ -45,7 +70,7 @@ jobs:
ref: ${{ github.head_ref }}
fetch-depth: '0'
- name: Setup Scala
uses: actions/setup-java@v3.6.0
uses: actions/setup-java@v3.9.0
with:
distribution: temurin
java-version: 17
......@@ -59,9 +84,9 @@ jobs:
git add README.md
git commit -m "Update README.md" || echo "No changes to commit"
- name: Create Pull Request
uses: peter-evans/create-pull-request@v4
uses: peter-evans/create-pull-request@v4.2.3
with:
body: |
body: |-
Autogenerated changes after running the `sbt docs/generateReadme` command of the [zio-sbt-website](https://zio.dev/zio-sbt) plugin.
I will automatically update the README.md file whenever there is new change for README.md, e.g.
......@@ -69,6 +94,5 @@ jobs:
- After any changes to the "docs/index.md" file, I will update the README.md file accordingly.
branch: zio-sbt-website/update-readme
commit-message: Update README.md
branch-suffix: short-commit-hash
delete-branch: true
title: Update README.md
......@@ -8,9 +8,7 @@
> The client is still a work-in-progress. Watch this space!
|Project Stage | CI | Release | Snapshot | Discord | Github |
|--------------|----|---------|----------|---------|--------|
|[![Experimental](https://img.shields.io/badge/Project%20Stage-Experimental-yellowgreen.svg)](https://github.com/zio/zio/wiki/Project-Stages) |![CI Badge](https://github.com/zio/zio-redis/workflows/CI/badge.svg) |[![Sonatype Releases](https://img.shields.io/nexus/r/https/oss.sonatype.org/dev.zio/zio-redis_2.12.svg)](https://oss.sonatype.org/content/repositories/releases/dev/zio/zio-redis_2.12/) |[![Sonatype Snapshots](https://img.shields.io/nexus/s/https/oss.sonatype.org/dev.zio/zio-redis_2.12.svg)](https://oss.sonatype.org/content/repositories/snapshots/dev/zio/zio-redis_2.12/) |[![Chat on Discord!](https://img.shields.io/discord/629491597070827530?logo=discord)](https://discord.gg/2ccFBr4) |[![ZIO Redis](https://img.shields.io/github/stars/zio/zio-redis?style=social)](https://github.com/zio/zio-redis) |
[![Experimental](https://img.shields.io/badge/Project%20Stage-Experimental-yellowgreen.svg)](https://github.com/zio/zio/wiki/Project-Stages) ![CI Badge](https://github.com/zio/zio-redis/workflows/CI/badge.svg) [![Sonatype Snapshots](https://img.shields.io/nexus/s/https/oss.sonatype.org/dev.zio/zio-redis_2.13.svg?label=Sonatype%20Snapshot)](https://oss.sonatype.org/content/repositories/snapshots/dev/zio/zio-redis_2.13/) [![ZIO Redis](https://img.shields.io/github/stars/zio/zio-redis?style=social)](https://github.com/zio/zio-redis)
## Introduction
......
......@@ -33,7 +33,7 @@ lazy val root =
project
.in(file("."))
.settings(publish / skip := true)
.aggregate(redis, benchmarks, example)
.aggregate(redis, benchmarks, example, docs)
lazy val redis =
project
......@@ -98,15 +98,12 @@ lazy val docs = project
moduleName := "zio-redis-docs",
scalacOptions -= "-Yno-imports",
scalacOptions -= "-Xfatal-warnings",
projectName := "ZIO Redis",
badgeInfo := Some(
BadgeInfo(
artifact = "zio-redis_2.12",
projectStage = ProjectStage.Experimental
)
),
docsPublishBranch := "master",
libraryDependencies += "dev.zio" %% "zio-schema-protobuf" % "0.3.1"
projectName := "ZIO Redis",
mainModuleName := (redis / moduleName).value,
projectStage := ProjectStage.Experimental,
ScalaUnidoc / unidoc / unidocProjectFilter := inProjects(redis),
docsPublishBranch := "master",
libraryDependencies += "dev.zio" %% "zio-schema-protobuf" % "0.3.1"
)
.dependsOn(redis)
.enablePlugins(WebsitePlugin)
......@@ -8,6 +8,6 @@ addSbtPlugin("de.heikoseeberger" % "sbt-header" % "5.9.0")
addSbtPlugin("org.scalameta" % "sbt-mdoc" % "2.3.6")
addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.5.0")
addSbtPlugin("pl.project13.scala" % "sbt-jmh" % "0.4.3")
addSbtPlugin("dev.zio" % "zio-sbt-website" % "0.2.4")
addSbtPlugin("dev.zio" % "zio-sbt-website" % "0.3.4")
libraryDependencies += "org.snakeyaml" % "snakeyaml-engine" % "2.5"
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册