Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Python: Split Python docs #5727

Merged
merged 2 commits into from
Sep 21, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .asf.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@ github:
- SreeramGarlapati
- samredai
- Fokko
ghp_branch: gh-pages
ghp_path: ~

notifications:
commits: commits@iceberg.apache.org
Expand Down
59 changes: 59 additions & 0 deletions .github/workflows/python-ci-docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
#

name: "Python Docs"
on:
push:
branches:
- 'master'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we add paths here with python/docs/**?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good call 👍🏻

paths:
- 'python/docs/**'

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}

jobs:
docs:
runs-on: ubuntu-20.04

steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python }}
- name: Install
working-directory: ./python/mkdocs
run: pip install -r requirements.txt
- name: Build
working-directory: ./python/mkdocs
run: mkdocs build
- name: Copy
working-directory: ./python/mkdocs
run: mv ./site /tmp/site
- name: Push changes to gh-pages branch
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not use mkdocs gh-deploy? That should automatically push to gh-pages.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wasn't sure what mkdocs gh-deploy is doing under the hood, therefore I made the steps explicit.

run: |
git checkout --orphan gh-pages-tmp
git rm --quiet -rf .
cp -r /tmp/site/* .
git config --global user.name 'GitHub Actions'
git config --global user.email 'actions@github.com'
git add --all
git commit -m 'Publish Python docs'
git push -f origin gh-pages-tmp:gh-pages || true
184 changes: 0 additions & 184 deletions docs/python-api-intro.md

This file was deleted.

79 changes: 0 additions & 79 deletions docs/python-feature-support.md

This file was deleted.

Loading