You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "kou (via GitHub)" <gi...@apache.org> on 2023/03/21 14:53:59 UTC
[GitHub] [arrow-datafusion] kou commented on a diff in pull request #5670: Fixes #5500 - Add a Github Actions workflow that builds the docs
kou commented on code in PR #5670:
URL: https://github.com/apache/arrow-datafusion/pull/5670#discussion_r1143493753
##########
.github/workflows/docs.yaml:
##########
@@ -0,0 +1,60 @@
+on:
+ push:
+ branches:
+ - master
Review Comment:
```suggestion
- main
```
BTW, is it intentional to publish the `main` branch contents (not tagged contents) to https://arrow.apache.org/datafusion/ ?
FYI: ADBC publishes multiple versions:
* https://arrow.apache.org/adbc/ : Redirects to the latest release
* https://arrow.apache.org/adbc/0.2.0/ : The latest release
* https://arrow.apache.org/adbc/0.1.0/ : An old release
* https://arrow.apache.org/adbc/main/ : The next release (not released yet)
See also:
* https://github.com/apache/arrow-adbc/blob/main/.github/workflows/nightly-website.yml
* https://github.com/apache/arrow-adbc/blob/main/ci/scripts/website_build.sh
##########
.github/workflows/docs.yaml:
##########
@@ -0,0 +1,60 @@
+on:
+ push:
+ branches:
+ - master
+ paths:
+ - .github/workflows/docs.yaml
+ - docs/**
+
+name: Deploy DataFusion site
+
+jobs:
+ build-docs:
+ name: Build docs
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout docs sources
+ uses: actions/checkout@v3
+
+ - name: Checkout asf-site branch
+ uses: actions/checkout@v3
+ with:
+ ref: asf-site
+ path: asf-site
+
+ - name: Setup Python
+ uses: actions/setup-python@v4
+ with:
+ python-version: "3.10"
+
+ - name: Install dependencies
+ run: |
+ set -x
+ python3 -m venv venv
+ source venv/bin/activate
+ pip install -r docs/requirements.txt
+
+ - name: Build docs
+ run: |
+ set -x
+ source venv/bin/activate
+ cd docs
+ ./build.sh
+
+ - name: Copy & push the generated HTML
+ run: |
+ set -x
+ cd asf-site/
+ # delete anything but: 1) '.'; 2) '..'; 3) .git/
+ rm -rf .github .buildinfo .gitattributes .github_changelog_generator .gitignore .gitmodules
+ find ./ | grep -vE "^./$|^../$|^./.git" | xargs rm -rf
+ cp ../.asf.yaml .
+ cp -rT ../docs/build/html/ .
Review Comment:
FYI: We can use `rsync` for this like https://github.com/apache/arrow-site/blob/main/.github/workflows/deploy.yml#L98-L107 :
```suggestion
rsync \
-a \
--delete \
--exclude '/.git/' \
../docs/build/html/ \
./
cp ../.asf.yaml .
```
##########
.asf.yaml:
##########
@@ -39,3 +39,7 @@ github:
rebase: false
features:
issues: true
+
+publish:
+ whoami: asf-site
+ subdir: datafusion
Review Comment:
Could you add a new line here?
--
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: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org