Skip to content
This repository has been archived by the owner on Jan 13, 2025. It is now read-only.

Commit

Permalink
Auto-generate README File (#446)
Browse files Browse the repository at this point in the history
* auto-generate readme file.

* update zio-sbt-website plugin.
  • Loading branch information
khajavi authored Jan 5, 2023
1 parent b645f9f commit e4af34b
Show file tree
Hide file tree
Showing 5 changed files with 113 additions and 33 deletions.
91 changes: 68 additions & 23 deletions .github/workflows/site.yml
Original file line number Diff line number Diff line change
@@ -1,28 +1,73 @@
# This file was autogenerated using `zio-sbt` via `sbt generateGithubWorkflow`
# task and should be included in the git repository. Please do not edit
# it manually.
# This file was autogenerated using `zio-sbt-website` via `sbt generateGithubWorkflow`
# task and should be included in the git repository. Please do not edit it manually.

name: website

on:
name: Website
'on':
workflow_dispatch: {}
release:
types: [ published ]

types:
- published
push:
branches:
- master
jobs:
publish-docs:
runs-on: ubuntu-20.04
timeout-minutes: 30
name: Publish Docs
runs-on: ubuntu-latest
if: ${{ ((github.event_name == 'release') && (github.event.action == 'published')) || (github.event_name == 'workflow_dispatch') }}
steps:
- name: Git Checkout
uses: actions/[email protected]
with:
fetch-depth: '0'
- name: Setup Scala
uses: actions/[email protected]
with:
distribution: temurin
java-version: 17
check-latest: true
- name: Setup NodeJs
uses: actions/setup-node@v3
with:
node-version: 16.x
registry-url: https://registry.npmjs.org
- name: Publish Docs to NPM Registry
run: sbt docs/publishToNpm
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
generate-readme:
name: Generate README
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
with:
fetch-depth: 0
- name: Setup Scala and Java
uses: olafurpg/setup-scala@v13
- uses: actions/setup-node@v3
with:
node-version: '16.x'
registry-url: 'https://registry.npmjs.org'
- name: Publishing Docs to NPM Registry
run: sbt docs/publishToNpm
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
- name: Git Checkout
uses: actions/[email protected]
with:
ref: ${{ github.head_ref }}
fetch-depth: '0'
- name: Setup Scala
uses: actions/[email protected]
with:
distribution: temurin
java-version: 17
check-latest: true
- name: Generate Readme
run: sbt docs/generateReadme
- name: Commit Changes
run: |
git config --local user.email "github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
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
with:
title: Update README.md
commit-message: Update README.md
branch: zio-sbt-website/update-readme
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.
- After each release, I will update the version in the installation section.
- After any changes to the "docs/index.md" file, I will update the README.md file accordingly.
10 changes: 9 additions & 1 deletion build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,15 @@ lazy val docs = project
scalacOptions ~= { _.filterNot(_.startsWith("-Xlint")) },
libraryDependencies ++= Seq(
("com.github.ghik" % "silencer-lib" % "1.6.0" % Provided).cross(CrossVersion.full)
)
),
projectName := "ZIO Keeper",
badgeInfo := Some(
BadgeInfo(
artifact = "zio-keeper_2.12",
projectStage = ProjectStage.Experimental
)
),
docsPublishBranch := "master"
)
.dependsOn(keeper)
.enablePlugins(WebsitePlugin)
30 changes: 25 additions & 5 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,35 @@ title: "Introduction to ZIO Keeper"
sidebar_label: "Introduction"
---

ZIO Keeper is a purely-functional, type-safe library for building distributed
systems.
ZIO Keeper is a purely-functional, type-safe library for building distributed systems.

@PROJECT_BADGES@

## Introduction

It provides numerous primitives for tackling the common problems in distributed computing (e.g. leader election, cluster forming etc.).

Under the hood, the library is backed by [ZIO][Link-ZIO] and [ZIO NIO][Link-NIO], profiting from their performant, type and resource-safe APIs:
- **Composable**. Design complex systems by composing the available building blocks.
- **Resilient**. Build apps with automated failure recovery.
- **Secure**. Benefit from security guarantees built into the library core.

From the high-level perspective, the library can be separated into the following
"modules":

- transport
- membership
- consensus

This section provides an in-depth treatment of each of the aforementioned modules,
explaining their design and demonstrating their usage.
## Installation

In order to use this library, we need to add the following line in our `build.sbt` file:

```scala
libraryDependencies += "dev.zio" %% "zio-keeper" % "@VERSION@"

resolvers += Resolver.sonatypeRepo("snapshots")
```

[Link-ZIO]: https://zio.dev
[Link-NIO]: https://zio.github.io/zio-nio/

13 changes: 10 additions & 3 deletions docs/sidebars.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,15 @@
const sidebars = {
sidebar: [
"index",
"meetings",
"references"
{
type: "category",
label: "ZIO Keeper",
collapsed: false,
link: { type: "doc", id: "index" },
items: [
"meetings",
"references"
]
}
]
};

Expand Down
2 changes: 1 addition & 1 deletion project/plugins.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@ addSbtPlugin("com.geirsson" % "sbt-ci-release" % "1.5.5")
addSbtPlugin("com.github.cb372" % "sbt-explicit-dependencies" % "0.2.16")
addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.4.2")
addSbtPlugin("org.scalameta" % "sbt-mdoc" % "2.2.14")
addSbtPlugin("dev.zio" % "zio-sbt-website" % "0.0.0+84-6fd7d64e-SNAPSHOT")
addSbtPlugin("dev.zio" % "zio-sbt-website" % "0.2.4")

resolvers += Resolver.sonatypeRepo("public")

0 comments on commit e4af34b

Please sign in to comment.