-
Notifications
You must be signed in to change notification settings - Fork 419
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
42 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 | ||
|
@@ -26,6 +36,11 @@ jobs: | |
src: docs/src/python | ||
|
||
build: | ||
needs: | ||
[ | ||
lint, | ||
markdown-link-check, | ||
] | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
@@ -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 }}`" | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 }}" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters