Skip to content
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
57 changes: 57 additions & 0 deletions .github/workflows/python-nightly-docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
#
# 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: "Nightly Documentation"

on:
schedule:
# Run at midnight UTC
- cron: '0 0 * * *'
workflow_dispatch: # Allow manual triggering

jobs:
build-and-deploy-nightly:
runs-on: ubuntu-22.04
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.12'
cache: 'pip'

- name: Install poetry
run: make install-poetry

- name: Install documentation dependencies
run: make docs-install

- name: Build and deploy nightly documentation
run: |
cd mkdocs/docs/nightly
git config --global user.name 'GitHub Actions'
git config --global user.email '[email protected]'
mkdocs gh-deploy --remote-branch=gh-pages --config-file mkdocs.yml --remote-name origin --force --dir-name nightly
19 changes: 5 additions & 14 deletions .github/workflows/python-release-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,22 +35,13 @@ jobs:
run: make install-poetry
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python }}
python-version: 3.12
- name: Install docs
run: make docs-install
- name: Build docs
run: make docs-build
- name: Copy
working-directory: ./mkdocs
run: mv ./site /tmp/site
- name: Push changes to gh-pages branch
- name: Deploy latest docs to gh-pages
run: |
git checkout --orphan gh-pages-tmp
git rm --quiet -rf .
cp -r /tmp/site/* .
cd mkdocs/docs/latest
git config --global user.name 'GitHub Actions'
git config --global user.email '[email protected]'
echo "py.iceberg.apache.org" > CNAME
git add --all
git commit -m 'Publish Python docs'
git push -f origin gh-pages-tmp:gh-pages || true
echo "py.iceberg.apache.org" > ../../CNAME
mkdocs gh-deploy --remote-branch=gh-pages --config-file mkdocs.yml --force
1 change: 1 addition & 0 deletions mkdocs/docs/SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
- [Release Notes](https://github.com/apache/iceberg-python/releases)
- [Nightly Build](nightly-build.md)
- [Code Reference](reference/)
- [Nightly](https://py.iceberg.apache.org/nightly/)

<!-- markdown-link-check-enable-->

Expand Down
68 changes: 68 additions & 0 deletions mkdocs/docs/latest/mkdocs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
# 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.
---
site_name: PyIceberg
site_url: https://py.iceberg.apache.org/
repo_url: "https://github.com/apache/iceberg-python"
repo_name: "apache/iceberg-python"

plugins:
- gen-files:
scripts:
- ../../gen_doc_stubs.py
- literate-nav:
nav_file: SUMMARY.md
- search
- section-index
- mkdocstrings:
handlers:
python:
paths: [../../..]

theme:
name: material
logo: ../../assets/images/iceberg-logo-icon.png
favicon: ../../assets/images/iceberg-logo-icon.png
font:
text: Lato
features:
- navigation.top
- navigation.tracking
- navigation.tabs
- navigation.tabs.sticky
palette:
- scheme: default
toggle:
icon: material/brightness-7
name: Switch to dark mode
- scheme: slate
toggle:
icon: material/brightness-4
name: Switch to light mode

markdown_extensions:
- admonition
- pymdownx.highlight:
anchor_linenums: true
line_spans: __span
pygments_lang_class: true
- pymdownx.inlinehilite
- pymdownx.snippets
- pymdownx.superfences

docs_dir: ../../docs
site_dir: ../../site
68 changes: 68 additions & 0 deletions mkdocs/docs/nightly/mkdocs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
# 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.
---
site_name: PyIceberg
site_url: https://py.iceberg.apache.org/nightly/
repo_url: "https://github.com/apache/iceberg-python"
repo_name: "apache/iceberg-python"

plugins:
- gen-files:
scripts:
- ../../gen_doc_stubs.py
- literate-nav:
nav_file: SUMMARY.md
- search
- section-index
- mkdocstrings:
handlers:
python:
paths: [../../..]

theme:
name: material
logo: ../../assets/images/iceberg-logo-icon.png
favicon: ../../assets/images/iceberg-logo-icon.png
font:
text: Lato
features:
- navigation.top
- navigation.tracking
- navigation.tabs
- navigation.tabs.sticky
palette:
- scheme: default
toggle:
icon: material/brightness-7
name: Switch to dark mode
- scheme: slate
toggle:
icon: material/brightness-4
name: Switch to light mode

markdown_extensions:
- admonition
- pymdownx.highlight:
anchor_linenums: true
line_spans: __span
pygments_lang_class: true
- pymdownx.inlinehilite
- pymdownx.snippets
- pymdownx.superfences

docs_dir: ../../docs
site_dir: ../../site