diff options
| author | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2023-02-28 13:14:51 +0100 |
|---|---|---|
| committer | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2023-03-01 13:34:28 +0100 |
| commit | 32f224e359c68e70e3f9a230be0265dcd6677079 (patch) | |
| tree | f1f83e61d5f4888e3728c217b4c6c20441952914 /.github | |
| parent | 8d2ac000e43c1cfa3d331a1580525ead3d5f32d7 (diff) | |
[4.2.x] Refs #34140 -- Added configurations to run blacken-docs linter and adjusted docs.
This adds:
- GitHub actions,
- tox configuration,
- pre-commit hook, and
- makefile rules
to run blacken-docs linter.
Co-authored-by: David Smith <smithdc@gmail.com>
Backport of 6015bab80e28aef2669f6fac53423aa65f70cb08 from main
Diffstat (limited to '.github')
| -rw-r--r-- | .github/workflows/docs.yml | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index b1a8b27107..0e0958ea97 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -38,3 +38,24 @@ jobs: run: | cd docs sphinx-build -b spelling -n -q -W --keep-going -d _build/doctrees -D language=en_US -j auto . _build/spelling + + blacken-docs: + runs-on: ubuntu-latest + name: blacken-docs + steps: + - name: Checkout + uses: actions/checkout@v3 + - name: Set up Python + uses: actions/setup-python@v4 + with: + python-version: '3.11' + - run: python -m pip install blacken-docs + - name: Build docs + run: | + cd docs + make black + RESULT=`cat _build/black/output.txt` + if [ "$RESULT" -gt 0 ]; then + echo "💥 📢 Code blocks in documentation must be reformatted with blacken-docs 📢 💥" + fi; + exit $RESULT |
