Skip to content

Commit

Permalink
Merge pull request zio#770 from khajavi/publish-docs-to-npm-registry
Browse files Browse the repository at this point in the history
Publish Docs to The NPM Registry
  • Loading branch information
jdegoes committed Nov 17, 2022
2 parents f37cb15 + b22d77b commit 34804a5
Show file tree
Hide file tree
Showing 33 changed files with 75 additions and 30,983 deletions.
15 changes: 14 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,22 @@ jobs:
- name: Run tests
run: sbt ++${{ matrix.scala }}! test

website:
runs-on: ubuntu-20.04
timeout-minutes: 60
steps:
- name: Checkout current branch
uses: actions/[email protected]
- name: Setup Scala and Java
uses: olafurpg/setup-scala@v13
- name: Cache scala dependencies
uses: coursier/cache-action@v6
- name: Check Document Generation
run: sbt docs/compileDocs

publish:
runs-on: ubuntu-20.04
needs: [lint, test]
needs: [lint, test, website]
if: github.event_name != 'pull_request'
steps:
- name: Checkout current branch
Expand Down
28 changes: 28 additions & 0 deletions .github/workflows/site.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# 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:
release:
types: [ published ]

jobs:
publish-docs:
runs-on: ubuntu-20.04
timeout-minutes: 30
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 }}
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,5 +80,5 @@ To set up the project follow below steps:

If you want to learn more, please check out:

- [ZIO SQL Homepage](https://zio.github.io/zio-sql)
- [ZIO SQL Homepage](https://zio.dev/zio-sql)
- [ZIO SQL Discord](https://discord.gg/2ccFBr4)
5 changes: 2 additions & 3 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import sbtcrossproject.CrossPlugin.autoImport.crossProject
inThisBuild(
List(
organization := "dev.zio",
homepage := Some(url("https://zio.github.io/zio-sql/")),
homepage := Some(url("https://zio.dev/zio-sql/")),
licenses := List("Apache-2.0" -> url("http:https://www.apache.org/licenses/LICENSE-2.0")),
developers := List(
Developer("jdegoes", "John De Goes", "[email protected]", url("http:https://degoes.net"))
Expand Down Expand Up @@ -38,7 +38,6 @@ lazy val root = project
.aggregate(
coreJVM,
coreJS,
docs,
driver,
examples,
jdbc,
Expand Down Expand Up @@ -82,7 +81,7 @@ lazy val docs = project
scalacOptions -= "-Xfatal-warnings"
)
.dependsOn(postgres)
.enablePlugins(MdocPlugin, DocusaurusPlugin)
.enablePlugins(WebsitePlugin)

lazy val examples = project
.in(file("examples"))
Expand Down
45 changes: 0 additions & 45 deletions docs/about/code_of_conduct.md

This file was deleted.

284 changes: 0 additions & 284 deletions docs/about/contributing.md

This file was deleted.

8 changes: 0 additions & 8 deletions docs/about/index.md

This file was deleted.

8 changes: 6 additions & 2 deletions docs/overview/deep.md → docs/deep-dive.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
id: deep_dive
id: deep-dive
title: "Deep dive"
---

Expand Down Expand Up @@ -259,4 +259,8 @@ val query =
select(customerId, fName, lName, orderDateDerived)
.from(customers.lateral(derivedTable))
.orderBy(Ordering.Desc(orderDateDerived))
```
```

## Learning Resources

- [ZIO SQL Example Application](https://github.com/sviezypan/zio-sql-example) by [Jaro Regec](https://github.com/sviezypan)
16 changes: 8 additions & 8 deletions docs/overview/index.md → docs/index.md
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
---
id: overview_index
title: "Quick introduction"
id: index
title: "Introduction to ZIO SQL"
sidebar_label: "ZIO SQL"
---

TODO: Some initial statement about ZIO SQL

## Installation

ZIO SQL is packaged into separate modules for different databases. Depending on which of these (currently supported) systems you're using, you will need to add one of the following dependencies:

```scala
//PostgreSQL
libraryDependencies += "dev.zio" %% "zio-sql-postgres" % zioSqlVersion
libraryDependencies += "dev.zio" %% "zio-sql-postgres" % "@VERSION@"

//MySQL
libraryDependencies += "dev.zio" %% "zio-sql-mysql" % zioSqlVersion
libraryDependencies += "dev.zio" %% "zio-sql-mysql" % "@VERSION@"

//Oracle
libraryDependencies += "dev.zio" %% "zio-sql-oracle" % zioSqlVersion
libraryDependencies += "dev.zio" %% "zio-sql-oracle" % "@VERSION@"

//SQL Server
libraryDependencies += "dev.zio" %% "zio-sql-sqlserver" % zioSqlVersion
libraryDependencies += "dev.zio" %% "zio-sql-sqlserver" % "@VERSION@"
```

## Imports and modules
Expand Down
5 changes: 5 additions & 0 deletions docs/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"name": "@zio.dev/zio-sql",
"description": "ZIO SQL Documentation",
"license": "Apache-2.0"
}
6 changes: 0 additions & 6 deletions docs/resources/index.md

This file was deleted.

8 changes: 8 additions & 0 deletions docs/sidebars.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
const sidebars = {
sidebar: [
"index",
"deep-dive"
]
};

module.exports = sidebars;
6 changes: 0 additions & 6 deletions docs/usecases/index.md

This file was deleted.

3 changes: 3 additions & 0 deletions project/plugins.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,6 @@ addSbtPlugin("com.github.cb372" % "sbt-explicit-dependencies" %
addSbtPlugin("com.thoughtworks.sbt-api-mappings" % "sbt-api-mappings" % "3.0.2")
addSbtPlugin("ch.epfl.scala" % "sbt-scalafix" % "0.10.1")
addSbtPlugin("io.github.davidgregory084" % "sbt-tpolecat" % "0.4.1")
addSbtPlugin("dev.zio" % "zio-sbt-website" % "0.0.0+84-6fd7d64e-SNAPSHOT")

resolvers += Resolver.sonatypeRepo("public")
67 changes: 0 additions & 67 deletions website/core/Footer.js

This file was deleted.

Loading

0 comments on commit 34804a5

Please sign in to comment.