You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@streampipes.apache.org by bo...@apache.org on 2023/03/07 21:02:04 UTC

[streampipes] 02/02: add doc releasing to python deployment (#1375)

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

bossenti pushed a commit to branch 1375-versioning-for-python-docs
in repository https://gitbox.apache.org/repos/asf/streampipes.git

commit cf02ed627ee203d1822b36e257a23727bd7bcc85
Author: bossenti <bo...@posteo.de>
AuthorDate: Tue Mar 7 22:01:38 2023 +0100

    add doc releasing to python deployment (#1375)
---
 .github/workflows/pypi-deployment.yml | 26 +++++++++++++++++++++++---
 1 file changed, 23 insertions(+), 3 deletions(-)

diff --git a/.github/workflows/pypi-deployment.yml b/.github/workflows/pypi-deployment.yml
index 8651109a6..82792c662 100644
--- a/.github/workflows/pypi-deployment.yml
+++ b/.github/workflows/pypi-deployment.yml
@@ -13,9 +13,15 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-name: Deploy Python Package to PyPI
+name: Deploy Python Package to PyPI & update docs
 
-on: [workflow_dispatch]
+on:
+  workflow_dispatch:
+    inputs:
+      sp-version:
+        description: 'StreamPipes version to be released'
+        required: true
+        type: string
 
 permissions:
   contents: read
@@ -36,6 +42,7 @@ jobs:
         run: |
           python -m pip install --upgrade pip 
           pip install build twine
+          pip install -e ".[docs]"
 
       - name: Build package
         working-directory: ./streampipes-client-python
@@ -47,4 +54,17 @@ jobs:
         uses: pypa/gh-action-pypi-publish@release/v1
         with:
           user: __token__
-          password: ${{ secrets.PYPI_TOKEN }}
\ No newline at end of file
+          password: ${{ secrets.PYPI_TOKEN }}
+
+      - name: Publish new doc version and update alias
+        working-directory: ./streampipes-client-python
+        run: |
+          mike deploy ${{ inputs.sp-version }} latest -u --deploy-prefix ./streampipes-client-python/docs-tmp -b real/${{ inputs.sp-version }} 
+          git reset --hard  # undo local changes that delete generated doc files
+
+      - name: Publish Python docs as artifact
+        uses: actions/upload-artifact@v3
+        with:
+          name: streampipes-python-docs
+          path: streampipes-client-python/docs-tmp/**/*
+          retention-days: 2
\ No newline at end of file