Skip to content

Commit

Permalink
Merge branch 'main' into patch-1
Browse files Browse the repository at this point in the history
  • Loading branch information
rtyler authored Nov 6, 2023
2 parents ad3c327 + b3f478e commit ed1f531
Show file tree
Hide file tree
Showing 4 changed files with 42 additions and 40 deletions.
37 changes: 33 additions & 4 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,16 @@ on:
- docs/**
- mkdocs.yml
- .github/workflows/docs.yml
repository_dispatch:
types:
- release-docs
# Allow manual trigger for now
workflow_dispatch:

env:
IS_RELEASE: ${{ github.event_name == 'repository_dispatch' || github.event_name == 'workflow_dispatch' }}
BUILD_ARGS: ${{ (github.event_name == 'repository_dispatch' || github.event_name == 'workflow_dispatch') && 'install MATURIN_EXTRA_ARGS="--manylinux off"' || 'develop' }}

jobs:
markdown-link-check:
runs-on: ubuntu-latest
Expand All @@ -26,6 +36,11 @@ jobs:
src: docs/src/python

build:
needs:
[
lint,
markdown-link-check,
]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
Expand All @@ -50,15 +65,29 @@ jobs:
pip install virtualenv
virtualenv venv
source venv/bin/activate
make develop
cd ..
make ${{ env.BUILD_ARGS }}
- name: Install dependencies
run: |
source python/venv/bin/activate
pip install -r docs/requirements.txt
- name: Build documentation
- name: Build
run: |
source python/venv/bin/activate
mkdocs build
mkdocs build
- name: Deploy
if: ${{ env.IS_RELEASE == 'true' }}
uses: JamesIves/github-pages-deploy-action@v4
with:
folder: site
clean-exclude: |
python/
.nojekyll
single-commit: false
git-config-name: "Github Action"
git-config-email: "[email protected]"
commit-message: "doc update for tag `${{ github.event.client_payload.tag || github.ref_name }}`"


41 changes: 7 additions & 34 deletions .github/workflows/python_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -131,38 +131,11 @@ jobs:
permissions:
contents: write
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0 # fetch full history for gh-pages branch checkout
- name: Install minimal stable with clippy and rustfmt
uses: actions-rs/toolchain@v1
- name: Trigger the docs release event
uses: peter-evans/repository-dispatch@v2
with:
profile: default
toolchain: stable
override: true

- name: Build and install deltalake
run: |
make install MATURIN_EXTRA_ARGS="--manylinux off"
- name: Build Sphinx documentation
run: |
make build-documentation
mv docs/build ~/build
echo "Configuring git..."
git config --global user.name 'Github Action'
git config --global user.email '[email protected]'
git remote set-url origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/$GITHUB_REPOSITORY
echo "Commit to gh-pages branch..."
git reset --hard HEAD
git clean -d -fx .
git checkout gh-pages
cd ..
cp -avr ~/build/html/. ./python
PUSHED_TAG=${GITHUB_REF##*/}
git status
git add ./python
git commit -m "doc update for tag `${PUSHED_TAG}`"
git push origin gh-pages
event-type: release-docs
client-payload: >
{
"tag": "${{ github.ref_name }}"
}
2 changes: 1 addition & 1 deletion docs/_build/links.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
python:
DeltaTable: PYTHON_API_URL#deltalake.table.DeltaTable
DeltaTable: PYTHON_API_URL/delta_table
rust:
DeltaTable: https://docs.rs/deltalake/latest/deltalake/table/struct.DeltaTable.html
2 changes: 1 addition & 1 deletion mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -88,4 +88,4 @@ markdown_extensions:
- footnotes

extra:
python_api_url: https://delta-io.github.io/delta-rs/python/api_reference.html
python_api_url: https://delta-io.github.io/delta-rs/api/

0 comments on commit ed1f531

Please sign in to comment.