You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@streampipes.apache.org by ri...@apache.org on 2023/09/11 12:03:08 UTC

[streampipes] branch dev updated: [hotfix] Fix Github action for docs generation

This is an automated email from the ASF dual-hosted git repository.

riemer pushed a commit to branch dev
in repository https://gitbox.apache.org/repos/asf/streampipes.git


The following commit(s) were added to refs/heads/dev by this push:
     new 0830f376e [hotfix] Fix Github action for docs generation
0830f376e is described below

commit 0830f376e9a987e0ef034563ee5a0462f9d292b7
Author: Dominik Riemer <do...@gmail.com>
AuthorDate: Mon Sep 11 14:02:45 2023 +0200

    [hotfix] Fix Github action for docs generation
---
 .github/workflows/extensions-docs.yml                          | 10 +++-------
 .../org/apache/streampipes/smp/ExtractDocumentationMojo.java   |  9 +++++----
 2 files changed, 8 insertions(+), 11 deletions(-)

diff --git a/.github/workflows/extensions-docs.yml b/.github/workflows/extensions-docs.yml
index 8113f697b..b64e2ef27 100644
--- a/.github/workflows/extensions-docs.yml
+++ b/.github/workflows/extensions-docs.yml
@@ -43,27 +43,23 @@ jobs:
       - name: Build with Maven
         run: mvn clean package
 
-      - name: Check target folder
-        working-directory: ./streampipes-extensions/streampipes-extensions-all-jvm/target
-        run: ls -la  
-
       - name: Publish Extensions docs as artifact
         uses: actions/upload-artifact@v3
         with:
           name: streampipes-extensions-docs
-          path: ./streampipes-extensions/streampipes-extensions-all-jvm/target/docs/pe/
+          path: streampipes-extensions/streampipes-extensions-all-jvm/target/docs/pe/
           retention-days: 5
 
       - name: Publish Extensions image assets as artifact
         uses: actions/upload-artifact@v3
         with:
           name: streampipes-extensions-docs-image-assets
-          path: ./streampipes-extensions/streampipes-extensions-all-jvm/target/docs/img/
+          path: streampipes-extensions/streampipes-extensions-all-jvm/target/docs/img/
           retention-days: 5
 
       - name: Publish Extensions sidebar
         uses: actions/upload-artifact@v3
         with:
           name: streampipes-extensions-docs-sidebar
-          path: ./streampipes-extensions/streampipes-extensions-all-jvm/target/docs/sidebars.json
+          path: streampipes-extensions/streampipes-extensions-all-jvm/target/docs/sidebars.json
           retention-days: 5
diff --git a/streampipes-maven-plugin/src/main/java/org/apache/streampipes/smp/ExtractDocumentationMojo.java b/streampipes-maven-plugin/src/main/java/org/apache/streampipes/smp/ExtractDocumentationMojo.java
index a5b68bfaa..a1e57509e 100644
--- a/streampipes-maven-plugin/src/main/java/org/apache/streampipes/smp/ExtractDocumentationMojo.java
+++ b/streampipes-maven-plugin/src/main/java/org/apache/streampipes/smp/ExtractDocumentationMojo.java
@@ -76,9 +76,9 @@ public class ExtractDocumentationMojo extends AbstractMojo {
   @Override
   public void execute() throws MojoFailureException {
     var log = getLog();
-    var targetDir = this.session.getExecutionRootDirectory() + File.separator + "target";
+    var targetDir = this.session.getCurrentProject().getBasedir() + File.separator + "target";
     var spIgnoreFile =
-        this.session.getExecutionRootDirectory() + File.separator + SP_IGNORE_FILENAME;
+        this.session.getCurrentProject().getBasedir() + File.separator + SP_IGNORE_FILENAME;
     var docsBasePath = Paths.get(targetDir, DOCS_ROOT_FOLDER);
 
     try {
@@ -137,8 +137,9 @@ public class ExtractDocumentationMojo extends AbstractMojo {
       }
 
       var sidebarConfig = new SidebarConfigGenerator(log, extensionsElements).generate();
-      log.info("Writing sidebar config");
-      FileUtils.writeStringToFile(docsBasePath.resolve("sidebars.json").toFile(),
+      var sidebarPath = docsBasePath.resolve("sidebar.json");
+      log.info(String.format("Writing sidebar config to %s", sidebarPath));
+      FileUtils.writeStringToFile(sidebarPath.toFile(),
           sidebarConfig, Charsets.UTF_8);
 
     } catch (IOException | DependencyResolutionRequiredException | ClassNotFoundException