From 81403c95e0f7ffce1f6529a5b5e569ea27fcde00 Mon Sep 17 00:00:00 2001 From: Nadav Samet Date: Sun, 2 Aug 2020 19:27:13 -0700 Subject: [PATCH] Fix doc publishing --- .github/workflows/release.yml | 9 +++++---- build.sbt | 13 ++++++------- docs/{ => src/main/markdown}/common-protos.md | 0 docs/{ => src/main/markdown}/contact.md | 0 docs/{ => src/main/markdown}/customizations.md | 0 docs/{ => src/main/markdown}/faq.md | 0 docs/{ => src/main/markdown}/generated-code.md | 0 docs/{ => src/main/markdown}/getting-started.md | 0 docs/{ => src/main/markdown}/grpc.md | 0 docs/{ => src/main/markdown}/installation.md | 0 docs/{ => src/main/markdown}/intro.md | 0 docs/{ => src/main/markdown}/json.md | 0 docs/{ => src/main/markdown}/sbt-settings.md | 0 docs/{ => src/main/markdown}/scala.js.md | 0 docs/{ => src/main/markdown}/scalapbc.md | 0 docs/{ => src/main/markdown}/sealed-oneofs.md | 0 docs/{ => src/main/markdown}/sparksql.md | 0 docs/{ => src/main/markdown}/third-party-protos.md | 0 docs/{ => src/main/markdown}/upgrading.md | 0 .../{ => src/main/markdown}/user_defined_options.md | 0 .../src/main/protobuf/duration.proto | 0 {scalapb-docs => docs}/src/main/protobuf/json.proto | 0 .../src/main/protobuf/person.proto | 0 {scalapb-docs => docs}/src/main/scala/S.scala | 0 .../scala/com/thesamet/docs/json/JsonProto.scala | 0 .../scala/com/thesamet/docs/json/MyContainer.scala | 0 .../scala/com/thesamet/docs/json/MyMessage.scala | 0 .../src/main/scala/mytypes/duration/Duration.scala | 0 .../main/scala/mytypes/duration/DurationProto.scala | 0 .../src/main/scala/scalapb/docs/CommonProtos.scala | 0 .../main/scala/scalapb/docs/benchmarks/Charts.scala | 0 .../scalapb/docs/benchmarks/ProtoSnippet.scala | 0 .../src/main/scala/scalapb/docs/person/Person.scala | 0 .../scala/scalapb/docs/person/PersonProto.scala | 0 .../src/main/scala/scalapb/perf/protos/Color.scala | 0 .../src/main/scala/scalapb/perf/protos/Enum.scala | 0 .../main/scala/scalapb/perf/protos/EnumVector.scala | 0 .../main/scala/scalapb/perf/protos/IntVector.scala | 0 .../scalapb/perf/protos/MessageContainer.scala | 0 .../scala/scalapb/perf/protos/ProtosProto.scala | 0 .../scala/scalapb/perf/protos/SimpleMessage.scala | 0 .../scala/scalapb/perf/protos/StringMessage.scala | 0 project/plugins.sbt | 2 +- website/docusaurus.config.js | 4 ++-- 44 files changed, 14 insertions(+), 14 deletions(-) rename docs/{ => src/main/markdown}/common-protos.md (100%) rename docs/{ => src/main/markdown}/contact.md (100%) rename docs/{ => src/main/markdown}/customizations.md (100%) rename docs/{ => src/main/markdown}/faq.md (100%) rename docs/{ => src/main/markdown}/generated-code.md (100%) rename docs/{ => src/main/markdown}/getting-started.md (100%) rename docs/{ => src/main/markdown}/grpc.md (100%) rename docs/{ => src/main/markdown}/installation.md (100%) rename docs/{ => src/main/markdown}/intro.md (100%) rename docs/{ => src/main/markdown}/json.md (100%) rename docs/{ => src/main/markdown}/sbt-settings.md (100%) rename docs/{ => src/main/markdown}/scala.js.md (100%) rename docs/{ => src/main/markdown}/scalapbc.md (100%) rename docs/{ => src/main/markdown}/sealed-oneofs.md (100%) rename docs/{ => src/main/markdown}/sparksql.md (100%) rename docs/{ => src/main/markdown}/third-party-protos.md (100%) rename docs/{ => src/main/markdown}/upgrading.md (100%) rename docs/{ => src/main/markdown}/user_defined_options.md (100%) rename {scalapb-docs => docs}/src/main/protobuf/duration.proto (100%) rename {scalapb-docs => docs}/src/main/protobuf/json.proto (100%) rename {scalapb-docs => docs}/src/main/protobuf/person.proto (100%) rename {scalapb-docs => docs}/src/main/scala/S.scala (100%) rename {scalapb-docs => docs}/src/main/scala/com/thesamet/docs/json/JsonProto.scala (100%) rename {scalapb-docs => docs}/src/main/scala/com/thesamet/docs/json/MyContainer.scala (100%) rename {scalapb-docs => docs}/src/main/scala/com/thesamet/docs/json/MyMessage.scala (100%) rename {scalapb-docs => docs}/src/main/scala/mytypes/duration/Duration.scala (100%) rename {scalapb-docs => docs}/src/main/scala/mytypes/duration/DurationProto.scala (100%) rename {scalapb-docs => docs}/src/main/scala/scalapb/docs/CommonProtos.scala (100%) rename {scalapb-docs => docs}/src/main/scala/scalapb/docs/benchmarks/Charts.scala (100%) rename {scalapb-docs => docs}/src/main/scala/scalapb/docs/benchmarks/ProtoSnippet.scala (100%) rename {scalapb-docs => docs}/src/main/scala/scalapb/docs/person/Person.scala (100%) rename {scalapb-docs => docs}/src/main/scala/scalapb/docs/person/PersonProto.scala (100%) rename {scalapb-docs => docs}/src/main/scala/scalapb/perf/protos/Color.scala (100%) rename {scalapb-docs => docs}/src/main/scala/scalapb/perf/protos/Enum.scala (100%) rename {scalapb-docs => docs}/src/main/scala/scalapb/perf/protos/EnumVector.scala (100%) rename {scalapb-docs => docs}/src/main/scala/scalapb/perf/protos/IntVector.scala (100%) rename {scalapb-docs => docs}/src/main/scala/scalapb/perf/protos/MessageContainer.scala (100%) rename {scalapb-docs => docs}/src/main/scala/scalapb/perf/protos/ProtosProto.scala (100%) rename {scalapb-docs => docs}/src/main/scala/scalapb/perf/protos/SimpleMessage.scala (100%) rename {scalapb-docs => docs}/src/main/scala/scalapb/perf/protos/StringMessage.scala (100%) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index e25c3a187..f20c88227 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -21,6 +21,9 @@ jobs: - uses: actions/setup-java@v1 with: java-version: 12 + - uses: actions/setup-node@v1 + with: + node-version: '12.x' - uses: olafurpg/setup-gpg@v2 if: startsWith(github.ref, 'refs/tags/v') - name: Publish ${{ github.ref }} @@ -30,10 +33,6 @@ jobs: PGP_SECRET: ${{ secrets.PGP_SECRET }} SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }} SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }} - - - uses: actions/setup-node@v1 - with: - node-version: '12.x' - name: Update docs run: | git config --global user.name "ScalaPB Docs" @@ -46,6 +45,8 @@ jobs: yarn deploy env: TOKEN: ${{secrets.DEPLOY_KEY}} + USE_SSH: true + GIT_USER: git scalapbc: runs-on: ubuntu-latest diff --git a/build.sbt b/build.sbt index a73cad7d8..388265f69 100644 --- a/build.sbt +++ b/build.sbt @@ -291,11 +291,11 @@ lazy val e2eNoJava = (projectMatrix in file("e2e-nojava")) ) lazy val docs = project - .in(file("scalapb-docs")) .enablePlugins(MdocPlugin, DocusaurusPlugin, ScalaUnidocPlugin) .dependsOn(runtimeJVM2_12) .settings(commonSettings) .settings( + publish / skip := true, scalaVersion := Scala212, crossScalaVersions := Seq(Scala212), libraryDependencies ++= Seq( @@ -306,7 +306,7 @@ lazy val docs = project "com.lihaoyi" %% "os-lib" % "0.5.0", "org.plotly-scala" %% "plotly-render" % "0.7.2" ), - // mdocIn := baseDirectory.value / "src" / "main" / "markdown", + mdocIn := baseDirectory.value / "src" / "main" / "markdown", siteSubdirName in ScalaUnidoc := "api/scalapb/latest", addMappingsToSiteDir(mappings in (ScalaUnidoc, packageDoc), siteSubdirName in ScalaUnidoc), unidocProjectFilter in (ScalaUnidoc, unidoc) := inProjects( @@ -318,11 +318,10 @@ lazy val docs = project cleanFiles += (target in (ScalaUnidoc, unidoc)).value, docusaurusCreateSite := docusaurusCreateSite.dependsOn(unidoc in Compile).value, docusaurusPublishGhpages := docusaurusPublishGhpages.dependsOn(unidoc in Compile).value, - mdocVariables := Map( - "scalapb" -> "0.10.8", - "sbt_protoc" -> "0.99.34", - "protoc" -> "3.11.4", + "scalapb" -> "0.10.8", + "sbt_protoc" -> "0.99.34", + "protoc" -> "3.11.4", "sparksql_scalapb" -> "0.10.4" ), git.remoteRepo := "git@github.com:scalapb/scalapb.github.io.git", @@ -331,5 +330,5 @@ lazy val docs = project includeFilter in ghpagesCleanSite := GlobFilter( (ghpagesRepository.value / "README.md").getCanonicalPath ) - */ + */ ) diff --git a/docs/common-protos.md b/docs/src/main/markdown/common-protos.md similarity index 100% rename from docs/common-protos.md rename to docs/src/main/markdown/common-protos.md diff --git a/docs/contact.md b/docs/src/main/markdown/contact.md similarity index 100% rename from docs/contact.md rename to docs/src/main/markdown/contact.md diff --git a/docs/customizations.md b/docs/src/main/markdown/customizations.md similarity index 100% rename from docs/customizations.md rename to docs/src/main/markdown/customizations.md diff --git a/docs/faq.md b/docs/src/main/markdown/faq.md similarity index 100% rename from docs/faq.md rename to docs/src/main/markdown/faq.md diff --git a/docs/generated-code.md b/docs/src/main/markdown/generated-code.md similarity index 100% rename from docs/generated-code.md rename to docs/src/main/markdown/generated-code.md diff --git a/docs/getting-started.md b/docs/src/main/markdown/getting-started.md similarity index 100% rename from docs/getting-started.md rename to docs/src/main/markdown/getting-started.md diff --git a/docs/grpc.md b/docs/src/main/markdown/grpc.md similarity index 100% rename from docs/grpc.md rename to docs/src/main/markdown/grpc.md diff --git a/docs/installation.md b/docs/src/main/markdown/installation.md similarity index 100% rename from docs/installation.md rename to docs/src/main/markdown/installation.md diff --git a/docs/intro.md b/docs/src/main/markdown/intro.md similarity index 100% rename from docs/intro.md rename to docs/src/main/markdown/intro.md diff --git a/docs/json.md b/docs/src/main/markdown/json.md similarity index 100% rename from docs/json.md rename to docs/src/main/markdown/json.md diff --git a/docs/sbt-settings.md b/docs/src/main/markdown/sbt-settings.md similarity index 100% rename from docs/sbt-settings.md rename to docs/src/main/markdown/sbt-settings.md diff --git a/docs/scala.js.md b/docs/src/main/markdown/scala.js.md similarity index 100% rename from docs/scala.js.md rename to docs/src/main/markdown/scala.js.md diff --git a/docs/scalapbc.md b/docs/src/main/markdown/scalapbc.md similarity index 100% rename from docs/scalapbc.md rename to docs/src/main/markdown/scalapbc.md diff --git a/docs/sealed-oneofs.md b/docs/src/main/markdown/sealed-oneofs.md similarity index 100% rename from docs/sealed-oneofs.md rename to docs/src/main/markdown/sealed-oneofs.md diff --git a/docs/sparksql.md b/docs/src/main/markdown/sparksql.md similarity index 100% rename from docs/sparksql.md rename to docs/src/main/markdown/sparksql.md diff --git a/docs/third-party-protos.md b/docs/src/main/markdown/third-party-protos.md similarity index 100% rename from docs/third-party-protos.md rename to docs/src/main/markdown/third-party-protos.md diff --git a/docs/upgrading.md b/docs/src/main/markdown/upgrading.md similarity index 100% rename from docs/upgrading.md rename to docs/src/main/markdown/upgrading.md diff --git a/docs/user_defined_options.md b/docs/src/main/markdown/user_defined_options.md similarity index 100% rename from docs/user_defined_options.md rename to docs/src/main/markdown/user_defined_options.md diff --git a/scalapb-docs/src/main/protobuf/duration.proto b/docs/src/main/protobuf/duration.proto similarity index 100% rename from scalapb-docs/src/main/protobuf/duration.proto rename to docs/src/main/protobuf/duration.proto diff --git a/scalapb-docs/src/main/protobuf/json.proto b/docs/src/main/protobuf/json.proto similarity index 100% rename from scalapb-docs/src/main/protobuf/json.proto rename to docs/src/main/protobuf/json.proto diff --git a/scalapb-docs/src/main/protobuf/person.proto b/docs/src/main/protobuf/person.proto similarity index 100% rename from scalapb-docs/src/main/protobuf/person.proto rename to docs/src/main/protobuf/person.proto diff --git a/scalapb-docs/src/main/scala/S.scala b/docs/src/main/scala/S.scala similarity index 100% rename from scalapb-docs/src/main/scala/S.scala rename to docs/src/main/scala/S.scala diff --git a/scalapb-docs/src/main/scala/com/thesamet/docs/json/JsonProto.scala b/docs/src/main/scala/com/thesamet/docs/json/JsonProto.scala similarity index 100% rename from scalapb-docs/src/main/scala/com/thesamet/docs/json/JsonProto.scala rename to docs/src/main/scala/com/thesamet/docs/json/JsonProto.scala diff --git a/scalapb-docs/src/main/scala/com/thesamet/docs/json/MyContainer.scala b/docs/src/main/scala/com/thesamet/docs/json/MyContainer.scala similarity index 100% rename from scalapb-docs/src/main/scala/com/thesamet/docs/json/MyContainer.scala rename to docs/src/main/scala/com/thesamet/docs/json/MyContainer.scala diff --git a/scalapb-docs/src/main/scala/com/thesamet/docs/json/MyMessage.scala b/docs/src/main/scala/com/thesamet/docs/json/MyMessage.scala similarity index 100% rename from scalapb-docs/src/main/scala/com/thesamet/docs/json/MyMessage.scala rename to docs/src/main/scala/com/thesamet/docs/json/MyMessage.scala diff --git a/scalapb-docs/src/main/scala/mytypes/duration/Duration.scala b/docs/src/main/scala/mytypes/duration/Duration.scala similarity index 100% rename from scalapb-docs/src/main/scala/mytypes/duration/Duration.scala rename to docs/src/main/scala/mytypes/duration/Duration.scala diff --git a/scalapb-docs/src/main/scala/mytypes/duration/DurationProto.scala b/docs/src/main/scala/mytypes/duration/DurationProto.scala similarity index 100% rename from scalapb-docs/src/main/scala/mytypes/duration/DurationProto.scala rename to docs/src/main/scala/mytypes/duration/DurationProto.scala diff --git a/scalapb-docs/src/main/scala/scalapb/docs/CommonProtos.scala b/docs/src/main/scala/scalapb/docs/CommonProtos.scala similarity index 100% rename from scalapb-docs/src/main/scala/scalapb/docs/CommonProtos.scala rename to docs/src/main/scala/scalapb/docs/CommonProtos.scala diff --git a/scalapb-docs/src/main/scala/scalapb/docs/benchmarks/Charts.scala b/docs/src/main/scala/scalapb/docs/benchmarks/Charts.scala similarity index 100% rename from scalapb-docs/src/main/scala/scalapb/docs/benchmarks/Charts.scala rename to docs/src/main/scala/scalapb/docs/benchmarks/Charts.scala diff --git a/scalapb-docs/src/main/scala/scalapb/docs/benchmarks/ProtoSnippet.scala b/docs/src/main/scala/scalapb/docs/benchmarks/ProtoSnippet.scala similarity index 100% rename from scalapb-docs/src/main/scala/scalapb/docs/benchmarks/ProtoSnippet.scala rename to docs/src/main/scala/scalapb/docs/benchmarks/ProtoSnippet.scala diff --git a/scalapb-docs/src/main/scala/scalapb/docs/person/Person.scala b/docs/src/main/scala/scalapb/docs/person/Person.scala similarity index 100% rename from scalapb-docs/src/main/scala/scalapb/docs/person/Person.scala rename to docs/src/main/scala/scalapb/docs/person/Person.scala diff --git a/scalapb-docs/src/main/scala/scalapb/docs/person/PersonProto.scala b/docs/src/main/scala/scalapb/docs/person/PersonProto.scala similarity index 100% rename from scalapb-docs/src/main/scala/scalapb/docs/person/PersonProto.scala rename to docs/src/main/scala/scalapb/docs/person/PersonProto.scala diff --git a/scalapb-docs/src/main/scala/scalapb/perf/protos/Color.scala b/docs/src/main/scala/scalapb/perf/protos/Color.scala similarity index 100% rename from scalapb-docs/src/main/scala/scalapb/perf/protos/Color.scala rename to docs/src/main/scala/scalapb/perf/protos/Color.scala diff --git a/scalapb-docs/src/main/scala/scalapb/perf/protos/Enum.scala b/docs/src/main/scala/scalapb/perf/protos/Enum.scala similarity index 100% rename from scalapb-docs/src/main/scala/scalapb/perf/protos/Enum.scala rename to docs/src/main/scala/scalapb/perf/protos/Enum.scala diff --git a/scalapb-docs/src/main/scala/scalapb/perf/protos/EnumVector.scala b/docs/src/main/scala/scalapb/perf/protos/EnumVector.scala similarity index 100% rename from scalapb-docs/src/main/scala/scalapb/perf/protos/EnumVector.scala rename to docs/src/main/scala/scalapb/perf/protos/EnumVector.scala diff --git a/scalapb-docs/src/main/scala/scalapb/perf/protos/IntVector.scala b/docs/src/main/scala/scalapb/perf/protos/IntVector.scala similarity index 100% rename from scalapb-docs/src/main/scala/scalapb/perf/protos/IntVector.scala rename to docs/src/main/scala/scalapb/perf/protos/IntVector.scala diff --git a/scalapb-docs/src/main/scala/scalapb/perf/protos/MessageContainer.scala b/docs/src/main/scala/scalapb/perf/protos/MessageContainer.scala similarity index 100% rename from scalapb-docs/src/main/scala/scalapb/perf/protos/MessageContainer.scala rename to docs/src/main/scala/scalapb/perf/protos/MessageContainer.scala diff --git a/scalapb-docs/src/main/scala/scalapb/perf/protos/ProtosProto.scala b/docs/src/main/scala/scalapb/perf/protos/ProtosProto.scala similarity index 100% rename from scalapb-docs/src/main/scala/scalapb/perf/protos/ProtosProto.scala rename to docs/src/main/scala/scalapb/perf/protos/ProtosProto.scala diff --git a/scalapb-docs/src/main/scala/scalapb/perf/protos/SimpleMessage.scala b/docs/src/main/scala/scalapb/perf/protos/SimpleMessage.scala similarity index 100% rename from scalapb-docs/src/main/scala/scalapb/perf/protos/SimpleMessage.scala rename to docs/src/main/scala/scalapb/perf/protos/SimpleMessage.scala diff --git a/scalapb-docs/src/main/scala/scalapb/perf/protos/StringMessage.scala b/docs/src/main/scala/scalapb/perf/protos/StringMessage.scala similarity index 100% rename from scalapb-docs/src/main/scala/scalapb/perf/protos/StringMessage.scala rename to docs/src/main/scala/scalapb/perf/protos/StringMessage.scala diff --git a/project/plugins.sbt b/project/plugins.sbt index 8be80ef1d..c37707500 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -34,7 +34,7 @@ addSbtPlugin("com.eed3si9n" % "sbt-projectmatrix" % "0.5.2") addSbtPlugin("ch.epfl.lamp" % "sbt-dotty" % "0.4.1") -addSbtPlugin("org.scalameta" % "sbt-mdoc" % "2.2.3" ) +addSbtPlugin("org.scalameta" % "sbt-mdoc" % "2.2.3") // For https://github.com/lightbend/mima/issues/422 resolvers += Resolver.url( diff --git a/website/docusaurus.config.js b/website/docusaurus.config.js index ce6aadb77..17617dac9 100644 --- a/website/docusaurus.config.js +++ b/website/docusaurus.config.js @@ -6,7 +6,7 @@ module.exports = { onBrokenLinks: 'throw', favicon: 'img/favicon.ico', organizationName: 'scalapb', // Usually your GitHub org/user name. - projectName: 'ScalaPB', // Usually your repo name. + projectName: 'scalapb.github.io', themeConfig: { sidebarCollapsible: false, navbar: { @@ -92,7 +92,7 @@ module.exports = { sidebarPath: require.resolve('./sidebars.js'), // mdoc generates to website/docs. The edit url makes it point at // the - path: '../scalapb-docs/target/mdoc', + path: '../docs/target/mdoc', // editUrl: // 'https://github.com/scalapb/ScalaPB/edit/master/docs/', },