Skip to content

Clean up runend metadata & stats (#1011) #206

Clean up runend metadata & stats (#1011)

Clean up runend metadata & stats (#1011) #206

Workflow file for this run

name: Python docs
on:
push:
branches: [ develop ]
permissions:
actions: read
contents: write
deployments: write
jobs:
deploy-python-docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/cleanup
- uses: ./.github/actions/setup-rust
- uses: ./.github/actions/setup-python
- name: build Python docs
run: |
set -ex
(cd pyvortex && rye run maturin develop)
cd docs
rye run sphinx-build -M html . _build --fail-on-warning --keep-going
- name: commit python docs to gh-pages-bench
run: |
set -ex
built_sha=$(git rev-parse HEAD)
mv docs/_build/html /tmp/html
git fetch origin
git checkout origin/gh-pages-bench
rm -rf docs
mv /tmp/html docs
git add docs
git config --global user.email "[email protected]"
git config --global user.name "github-action-deploy-python-docs"
# Only try to commit if there exist changes
git diff --quiet HEAD || {
git commit -m 'Python docs for '$built_sha
git push origin HEAD:gh-pages-bench
}
git checkout $built_sha