Uh oh!
There was an error while loading. Please reload this page.
Add a workflow that builds the docs and deploys them at staged or production - #104
Conversation
martin-g
commented
Dec 5, 2022
@andygrove Before merging this PR please create a new branch named |
martin-g
commented
Dec 5, 2022
@kou Please review! |
…duction Signed-off-by: Martin Tzvetanov Grigorov <mgrigorov@apache.org>
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
| - name: Copy & push the generated HTML | ||
| run: | | ||
| cd docs-target | ||
| find ./ -name "*.html" -type f -print0 | xargs -0 /bin/rm -f |
There was a problem hiding this comment.
This may not work for other extensions such as *.css. How about using rsync?
rsync \
-a \
--delete \
--exclude '/.git/' \
../docs/build/html/ \
./There was a problem hiding this 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
There was a problem hiding this comment.
How about copying .asf.yaml from master to asf-site?
apache/arrow-site uses this approach: apache/arrow-site#116
There was a problem hiding this comment.
This will work for asf-site, but it will break asf-staging, because it uses staging: instead of publish:
There was a problem hiding this comment.
find ./ -not -name ".asf.yaml" | grep -v ".git" | xargs rm -rf seems to do the trick.
There was a problem hiding this comment.
This will work for asf-site, but it will break asf-staging, because it uses
staging:instead ofpublish:
Can we write both staging: and publish: in master's .asf.yaml?
staging:
whoami: asf-stagingsubdir: datafusion-pythonpublish:
whoami: asf-sitesubdir: datafusion-pythonThere was a problem hiding this comment.
I think this should work!
The only way to find out is to try it! :-)
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Co-authored-by: Sutou Kouhei <kou@cozmixng.org>
52bcc20 to
64dc8d9CompareUse special email address for the Git user, so that it has an avatar/icon. Signed-off-by: Martin Tzvetanov Grigorov <mgrigorov@apache.org>
Signed-off-by: Martin Tzvetanov Grigorov <mgrigorov@apache.org>
Signed-off-by: Martin Tzvetanov Grigorov <mgrigorov@apache.org>
Signed-off-by: Martin Tzvetanov Grigorov <mgrigorov@apache.org>
Signed-off-by: Martin Tzvetanov Grigorov <mgrigorov@apache.org>
Signed-off-by: Martin Tzvetanov Grigorov <mgrigorov@apache.org>
kou
left a comment
There was a problem hiding this comment.
+1
This almost looks good to me. I think that we can merge this after we confirm that this works with 0.8.0-rc1 and 0.8.0 tags on your fork. (We need to merge this branch to master on your fork temporary to test these tags.)
Uh oh!
There was an error while loading. Please reload this page.
| on: | ||
| push: | ||
| branches: | ||
| - docs-workflow |
There was a problem hiding this comment.
We need to change this to master when we merge this.
There was a problem hiding this comment.
Right! I used it to be able to test on my fork!
| - name: Checkout docs target branch | ||
| uses: actions/checkout@v3 | ||
| with: | ||
| fetch-depth: 0 | ||
| ref: ${{ steps.target-branch.outputs.value }} | ||
| path: docs-target |
There was a problem hiding this comment.
It seems that we need to prepare asf-site and asf-staging branches for this: https://github.com/martin-g/arrow-datafusion-python/actions/runs/3633415170/jobs/6130403408
How about using git worktree instead?
diff --git a/.github/workflows/docs.yaml b/.github/workflows/docs.yaml
index 806202a..bfafafa 100644
--- a/.github/workflows/docs.yaml+++ b/.github/workflows/docs.yaml@@ -26,12 +26,6 @@ jobs:
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:
@@ -61,7 +55,12 @@ jobs:
- name: Copy & push the generated HTML
run: |
set -x
+ git worktree add docs-target
cd docs-target
+ if ! git checkout ${{ steps.target-branch.outputs.value }}; then+ git checkout --orphan ${{ steps.target-branch.outputs.value }}+ git rm -rf .+ fi
# delete anything but: 1) '.'; 2) '..'; 3) .git/
find ./ | grep -vE "^./$|^../$|^./.git" | xargs rm -rf
cp ../.asf.yaml .There was a problem hiding this comment.
IMO this is more complex/confusing than the current solution.
There was a problem hiding this comment.
A task before merging this PR is to create asf-staging branch.
There was a problem hiding this comment.
Uh oh!
There was an error while loading. Please reload this page.
Co-authored-by: Sutou Kouhei <kou@cozmixng.org>
Co-authored-by: Sutou Kouhei <kou@cozmixng.org>
martin-g
commented
Dec 7, 2022
Actually I already tested tags - see |
kou
commented
Dec 7, 2022
Could you retry |
Done! |
kou
commented
Dec 7, 2022
Thanks. Committed: martin-g@34ed8b8 I merge this. |
Which issue does this PR close?
Closes#39.
Rationale for this change
Publish the documentation for the Datafusion Python bindings.
When changes are pushed to
masterthen it will copy the generated HTMLs toasf-stagingbranch and update https://arrow.staged.apache.org/datafusion-python, i.e. the staging site. See Add a workflow that builds the docs and deploys them at staged or production #104 (comment)When changes are pushed to a non-RC tag, e.g.
0.8.0, then it will copy the generated HTMLs toasf-sitebranch and update https://arrow.apache.org/datafusion-python, i.e. the production site. See Issue #39 - Add .asf.yaml for asf-site #105What changes are included in this PR?
A new GitHub Actions workflow is introduced that builds the docs and deploys them at the appropriate site
Are there any user-facing changes?
No API changes!