Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Publish Docs to The NPM Registry #1001

Merged
merged 8 commits into from
Nov 22, 2022

Conversation

khajavi
Copy link
Member

@khajavi khajavi commented Nov 19, 2022

No description provided.

@khajavi khajavi requested a review from a team as a code owner November 19, 2022 06:56
@khajavi
Copy link
Member Author

khajavi commented Nov 19, 2022

This is ready for review.

Copy link
Member

@sideeffffect sideeffffect left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Huge thanks for spending your time on this. 🙇
May I just ask you for a clarification on a few things?

build.sbt Show resolved Hide resolved
build.sbt Show resolved Hide resolved
@@ -15,3 +15,6 @@ addSbtPlugin("org.scalameta" % "sbt-mdoc"
addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.5.0")
addSbtPlugin("pl.project13.scala" % "sbt-jcstress" % "0.2.0")
addSbtPlugin("pl.project13.scala" % "sbt-jmh" % "0.4.3")
addSbtPlugin("dev.zio" % "zio-sbt-website" % "0.0.0+84-6fd7d64e-SNAPSHOT")

resolvers += Resolver.sonatypeRepo("public")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isn't this redundant? I thought that it's already present by default.

Copy link
Member Author

@khajavi khajavi Nov 21, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I remember it causes the not found issue when downloading snapshot artifacts. I can recheck it.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For snapshots you need

resolvers ++= Resolver.sonatypeOssRepos("snapshots")

(don't use sonatypeRepo anymore, always just sonatypeOssRepos)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you! I removed that line and it works properly for th zio-prelude project. I need to investigate more to find out why I need to explicitly set the resolver for snapshot versions in some repos.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You need that ☝️ because you're using snapshot of zio-sbt-website

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In my local machine that works properly, maybe because of cached artifacts. Anyway, I added that line.

.github/workflows/site.yml Show resolved Hide resolved
@sideeffffect
Copy link
Member

sideeffffect commented Nov 22, 2022

Thanks for your work on this! 🙏

@@ -110,7 +110,7 @@ jobs:
with:
swap-size-gb: 7
- name: Check Website Generation
run: ./sbt docs/docusaurusCreateSite
run: ./sbt docs/compileDocs
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

btw does this also test building the actual website?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, not the whole! Right now it only checks the compilation of documents using mdoc. The next level is to check the validation of sidebar.js that is not included in this version of zio-sbt-website plugin.

@sideeffffect
Copy link
Member

Shall we merge?

@khajavi
Copy link
Member Author

khajavi commented Nov 22, 2022

@sideeffffect Yes, I'm ready to go!

@sideeffffect sideeffffect merged commit 79d59df into zio:master Nov 22, 2022
@khajavi khajavi deleted the publish-docs-to-npm-registry branch November 22, 2022 15:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants