You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by dj...@apache.org on 2024/01/24 08:35:04 UTC

(pulsar-dotpulsar) branch master updated: Web api (#201)

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

djensen pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/pulsar-dotpulsar.git


The following commit(s) were added to refs/heads/master by this push:
     new 2724496  Web api (#201)
2724496 is described below

commit 2724496eea0a383ab2870d48d7c11bc98c7fe910
Author: entvex <15...@users.noreply.github.com>
AuthorDate: Wed Jan 24 09:34:58 2024 +0100

    Web api (#201)
    
    When we release a new version of DotPulsar we would like to build the web API and deploy it to GitHub pages.
    
    ---------
    
    Co-authored-by: David Jensen <dj...@danskecommodities.com>
    Co-authored-by: tison <wa...@gmail.com>
---
 .asf.yaml                              |  5 +++--
 .github/workflows/publish-to-nuget.yml | 29 ++++++++++++++++++++++++++++-
 2 files changed, 31 insertions(+), 3 deletions(-)

diff --git a/.asf.yaml b/.asf.yaml
index fbe2ab9..6382baa 100644
--- a/.asf.yaml
+++ b/.asf.yaml
@@ -20,6 +20,8 @@
 github:
   description: "The official .NET client library for Apache Pulsar"
   homepage: https://pulsar.apache.org/
+  ghp_branch:  gh-pages
+  ghp_path:    /docs
   labels:
     - pulsar
     - pubsub
@@ -47,5 +49,4 @@ notifications:
   commits:      commits@pulsar.apache.org
   issues:       commits@pulsar.apache.org
   pullrequests: commits@pulsar.apache.org
-  discussions:  dev@pulsar.apache.org
-  jira_options: link label
+  discussions:  dev@pulsar.apache.org
\ No newline at end of file
diff --git a/.github/workflows/publish-to-nuget.yml b/.github/workflows/publish-to-nuget.yml
index a975162..ff5cae4 100644
--- a/.github/workflows/publish-to-nuget.yml
+++ b/.github/workflows/publish-to-nuget.yml
@@ -56,4 +56,31 @@ jobs:
       - name: Publish the package to nuget.org
         run: dotnet nuget push src/DotPulsar/bin/Release/*.nupkg --api-key $NUGET_AUTH_TOKEN --source https://api.nuget.org/v3/index.json
         env:
-          NUGET_AUTH_TOKEN: ${{ secrets.NUGET_KEY }}
\ No newline at end of file
+          NUGET_AUTH_TOKEN: ${{ secrets.NUGET_KEY }}
+          
+  build-web-api:
+    timeout-minutes: 30
+    needs: build
+    runs-on: ubuntu-latest
+    strategy:
+      fail-fast: false
+    steps:
+      - name: Check Out
+        uses: actions/checkout@v3
+      
+      - name: Setup .NET
+        uses: actions/setup-dotnet@v3
+        with:
+          dotnet-version: '8.0.x'
+
+      - name: Build docs with docfx
+        run: |
+          dotnet tool update -g docfx
+          dotnet build -p:TargetFramework=net8.0
+          docfx docs/api/docfx.json
+
+      - name: Deploy to GitHub Pages
+        uses: peaceiris/actions-gh-pages@v3
+        with:
+          github_token: ${{ secrets.GITHUB_TOKEN }}
+          publish_dir: ./docs
\ No newline at end of file