You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dolphinscheduler.apache.org by zh...@apache.org on 2022/01/26 10:19:10 UTC

[dolphinscheduler-website] branch master updated: [feat] Add python dist doc to document (#656)

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

zhongjiajie pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/dolphinscheduler-website.git


The following commit(s) were added to refs/heads/master by this push:
     new 63171f4  [feat] Add python dist doc to document (#656)
63171f4 is described below

commit 63171f4942e8799ac662e4a1280b6daae875db08
Author: Jiajie Zhong <zh...@hotmail.com>
AuthorDate: Wed Jan 26 18:19:00 2022 +0800

    [feat] Add python dist doc to document (#656)
---
 .github/workflows/website.yml | 39 ++++++++++++++++++++++++++++++++++++++-
 site_config/site.js           | 10 ++++++++++
 2 files changed, 48 insertions(+), 1 deletion(-)

diff --git a/.github/workflows/website.yml b/.github/workflows/website.yml
index 320bb12..3c352be 100644
--- a/.github/workflows/website.yml
+++ b/.github/workflows/website.yml
@@ -2,9 +2,40 @@ name: Build and Deploy
 
 on: [push]
 
+env:
+  PYDS_HOME: dolphinscheduler-python/pydolphinscheduler
+
 jobs:
-  build-and-deploy:
+  build-py-doc:
+    name: Build Python Doc
+    runs-on: ubuntu-latest
+    steps:
+      - name: Checkout apache/dolphinscheduler
+        uses: actions/checkout@v2
+        with:
+          repository: apache/dolphinscheduler
+      - name: Set up Python 3.7
+        uses: actions/setup-python@v2
+        with:
+          python-version: 3.7
+      - name: Install Development Dependences
+        working-directory: ${{ env.PYDS_HOME }}
+        run: |
+          pip install -r requirements_dev.txt
+          pip install -e .
+      - name: Test Build Document
+        working-directory: ${{ env.PYDS_HOME }}/docs
+        run: make clean && make html
+      - uses: actions/upload-artifact@v2
+        name: Upload Python API Dist Doc
+        with:
+          name: python-dist-doc
+          path: ${{ env.PYDS_HOME }}/docs/build/html
+          retention-days: 1
+
+  build-website-deploy:
     runs-on: ubuntu-latest
+    needs: [ build-py-doc ]
     steps:
     - name: Checkout
       uses: actions/checkout@master
@@ -16,6 +47,12 @@ jobs:
     - name: Build
       run: npm install && npm run build
 
+    - uses: actions/download-artifact@v2
+      name: Download Python API Dist Document
+      with:
+        name: python-dist-doc
+        path: dist/python
+
     - name: Deploy
       uses: peaceiris/actions-gh-pages@v3
       with:
diff --git a/site_config/site.js b/site_config/site.js
index 7be1385..7d086fb 100644
--- a/site_config/site.js
+++ b/site_config/site.js
@@ -35,6 +35,11 @@ export default {
             link: '/en-us/docs/latest/user_doc/architecture/listdocs.html',
           },
           {
+            key: 'pythonAPI',
+            text: 'PyDolphinScheduler',
+            link: '/python/index.html',
+          },
+          {
             key: 'docsdev',
             text: 'dev',
             link: '/en-us/docs/dev/user_doc/guide/quick-start.html',
@@ -212,6 +217,11 @@ export default {
             link: '/zh-cn/docs/latest/user_doc/architecture/listdocs.html',
           },
           {
+            key: 'pythonAPI',
+            text: 'PyDolphinScheduler',
+            link: '/python/index.html',
+          },
+          {
             key: 'docsdev',
             text: 'dev',
             link: '/zh-cn/docs/dev/user_doc/guide/quick-start.html',