martin-g commented on code in PR #104:
URL: 
https://github.com/apache/arrow-datafusion-python/pull/104#discussion_r1040616768


##########
.github/workflows/docs.yaml:
##########
@@ -0,0 +1,67 @@
+on:
+  push:
+    branches:
+      - master
+    tags:
+      - "!**-rc"
+    paths:
+      - docs/**
+      - .github/workflows/docs.yml
+
+
+name: Deploy Datafusion Python site
+
+jobs:
+  build-docs:
+    name: Build docs
+    runs-on: ubuntu-latest
+    steps:
+      - name: Set target branch
+        id: target-branch
+        run: |
+          if test '${{ github.ref }}' = 'refs/heads/master'; then
+            echo "value=asf-staging" >> $GITHUB_OUTPUT
+          elif test '${{ github.ref_type }}' = 'tag'; then
+            echo "value=asf-site" >> $GITHUB_OUTPUT
+          fi
+      - name: Checkout docs sources
+        uses: actions/checkout@v3
+      - name: Checkout docs target branch
+        uses: actions/checkout@v3
+        with:
+          fetch-depth: 0
+          ref: ${{ steps.target-branch.outputs.value }}
+          path: docs-target
+      - name: Setup Python
+        uses: actions/setup-python@v4
+        with:
+          python-version: "3.10"
+
+      - name: Install dependencies
+        run: |
+          python3 -m venv venv
+          source venv/bin/activate
+          pip install -r requirements-310.txt
+          pip install -r docs/requirements.txt
+      
+      - name: Build Datafusion
+        run: |
+          source venv/bin/activate
+          maturin develop
+
+      - name: Build docs
+        run: |
+          source venv/bin/activate
+          cd docs
+          make html
+
+      - name: Copy & push the generated HTML
+        run: |
+          cd docs-target
+          find ./ -name "*.html" -type f -print0 | xargs -0 /bin/rm -f

Review Comment:
   Right! There are .css/.js/images/... !
   I have to test your approach!
   The important thing is to preserve anything that is not autogenerated, 
especially `.asf.yaml`



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to