Skip to content

Commit

Permalink
Publish Docs to NPM registry (#155)
Browse files Browse the repository at this point in the history
* prepare docs.

* install zio-sbt-website plugin.

* update readme.

* remove website.

* update ci.

* update homepage url.

Co-authored-by: Milad Khajavi <khajavi@gmail.com>
  • Loading branch information
mschuwalow and khajavi committed Dec 13, 2022
1 parent d5411c4 commit ddd6bf2
Show file tree
Hide file tree
Showing 31 changed files with 48 additions and 764 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ jobs:
- name: Cache scala dependencies
uses: coursier/cache-action@v6
- name: Check Website Generation
run: ./sbt docs/docusaurusCreateSite
run: ./sbt docs/compileDocs

ci:
runs-on: ubuntu-20.04
Expand Down
40 changes: 17 additions & 23 deletions .github/workflows/site.yml
Original file line number Diff line number Diff line change
@@ -1,34 +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
steps:
- name: Checkout current branch
uses: actions/checkout@v3
- name: Setup Java
uses: actions/setup-java@v3.8.0
- uses: actions/checkout@v3.1.0
with:
distribution: temurin
java-version: 17
check-latest: true
- name: Install libuv
run: sudo apt-get update && sudo apt-get install -y libuv1-dev
- name: Set Swap Space
uses: pierotofy/set-swap-space@master
fetch-depth: 0
- name: Setup Scala and Java
uses: olafurpg/setup-scala@v13
- uses: actions/setup-node@v3
with:
swap-size-gb: 7
- run: sbt docs/docusaurusPublishGhpages
- name: Publish the site
run: ./sbt docs/docusaurusPublishGhpages
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 }}
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,14 +41,14 @@ And visualize your application performance in a number of different ways:
![Tracing Profiler Output](./website/static/img/example_tracing_profile.svg?raw=true")

# Documentation
[zio-profiling Microsite](https://zio.github.io/zio-profiling/)
[ZIO Profiling Microsite](https://zio.dev/zio-profiling/)

# Contributing
[Documentation for contributors](https://zio.github.io/zio-profiling/docs/about/about_contributing)
[Documentation for contributors](https://zio.dev/about/contributing/)

## Code of Conduct

See the [Code of Conduct](https://zio.github.io/zio-profiling/docs/about/about_coc)
See the [Code of Conduct](https://zio.dev/about/code-of-conduct)

## Support

Expand Down
18 changes: 5 additions & 13 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import Dependencies._
inThisBuild(
List(
organization := "dev.zio",
homepage := Some(url("https://zio.github.io/zio-profiling/")),
homepage := Some(url("https://zio.dev/zio-profiling/")),
licenses := List("Apache-2.0" -> url("http://www.apache.org/licenses/LICENSE-2.0")),
developers := List(
Developer("jdegoes", "John De Goes", "john@degoes.net", url("http://degoes.net")),
Expand All @@ -27,10 +27,8 @@ addCommandAlias("prepare", "fix; fmt")

lazy val root = project
.in(file("."))
.settings(
publish / skip := true
)
.aggregate(core, taggingPlugin, examples, benchmarks, docs)
.settings(publish / skip := true)
.aggregate(core, taggingPlugin, examples, benchmarks)

lazy val core = project
.in(file("zio-profiling"))
Expand Down Expand Up @@ -76,16 +74,10 @@ lazy val benchmarks = project
lazy val docs = project
.in(file("zio-profiling-docs"))
.dependsOn(core)
.enablePlugins(MdocPlugin, DocusaurusPlugin, ScalaUnidocPlugin)
.enablePlugins(WebsitePlugin)
.settings(
publish / skip := true,
moduleName := "zio-profiling-docs",
scalacOptions -= "-Yno-imports",
scalacOptions -= "-Xfatal-warnings",
mdocIn := (LocalRootProject / baseDirectory).value / "docs",
ScalaUnidoc / unidoc / unidocProjectFilter := inProjects(core),
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
scalacOptions -= "-Xfatal-warnings"
)
45 changes: 0 additions & 45 deletions docs/about/code_of_conduct.md

This file was deleted.

0 comments on commit ddd6bf2

Please sign in to comment.