Skip to content

Commit

Permalink
Publish Docs to The NPM Registry (#367)
Browse files Browse the repository at this point in the history
* update docs.

* install zio-sbt-website plugin.

* update homepage url.

* update ci.

* generate site workflow.

* update ci.
  • Loading branch information
khajavi committed Nov 15, 2022
1 parent 61d9293 commit 19f3d59
Show file tree
Hide file tree
Showing 11 changed files with 45 additions and 359 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Expand Up @@ -39,7 +39,7 @@ jobs:
- name: Cache scala dependencies
uses: coursier/cache-action@v6
- name: Check Document Generation
run: sbt docs/docusaurusCreateSite
run: sbt docs/compileDocs

test:
runs-on: ubuntu-20.04
Expand Down
30 changes: 19 additions & 11 deletions .github/workflows/site.yml
@@ -1,20 +1,28 @@
name: Website
# 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.

name: website

on:
push:
branches: [master]
release:
types:
- published
types: [ published ]

jobs:
publish:
publish-docs:
runs-on: ubuntu-20.04
timeout-minutes: 30
if: github.event_name != 'pull_request'
steps:
- uses: actions/checkout@v3
- uses: olafurpg/setup-scala@v13
- run: sbt docs/docusaurusPublishGhpages
- uses: actions/checkout@v3.1.0
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:
GIT_DEPLOY_KEY: ${{ secrets.GIT_DEPLOY_KEY }}
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -10,7 +10,7 @@ Setup
-----

The library is a thin wrapper over s3 async client.
Please find more details in the [website](https://zio.github.io/zio-s3/)
Please find more details in the [website](https://zio.dev/zio-s3/)

[Badge-Circle]: https://circleci.com/gh/zio/zio-s3.svg?style=svg "circleci"
[Link-Circle]: https://circleci.com/gh/zio/zio-s3 "circleci"
Expand Down
11 changes: 3 additions & 8 deletions build.sbt
Expand Up @@ -3,7 +3,7 @@ import BuildHelper._
inThisBuild(
List(
organization := "dev.zio",
homepage := Some(url("https://zio.github.io/zio-s3/")),
homepage := Some(url("https://zio.dev/zio-s3/")),
licenses := List("Apache-2.0" -> url("http://www.apache.org/licenses/LICENSE-2.0")),
developers := List(
Developer("regis-leray", "Regis Leray", "regis.leray@gmail.com", url("https://github.com/regis-leray"))
Expand Down Expand Up @@ -60,12 +60,7 @@ lazy val docs = project
scalacOptions -= "-Xfatal-warnings",
libraryDependencies ++= Seq(
"dev.zio" %% "zio" % zioVersion
),
(ScalaUnidoc / unidoc / unidocProjectFilter) := inProjects(`zio-s3`),
ScalaUnidoc / unidoc / target := (LocalRootProject / baseDirectory).value / "website" / "static" / "api",
cleanFiles += (ScalaUnidoc / unidoc / target).value,
docusaurusCreateSite := docusaurusCreateSite.dependsOn(Compile / unidoc).value,
docusaurusPublishGhpages := docusaurusPublishGhpages.dependsOn(Compile / unidoc).value
)
)
.dependsOn(`zio-s3`)
.enablePlugins(MdocPlugin, DocusaurusPlugin, ScalaUnidocPlugin)
.enablePlugins(WebsitePlugin)
45 changes: 0 additions & 45 deletions docs/about/code_of_conduct.md

This file was deleted.

0 comments on commit 19f3d59

Please sign in to comment.