make miri tests fast again (take 2) (#884) #109
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
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 |