Final documentation cleanup and refinements
This commit is contained in:
1 parent
cfb8290dea
commit
a5f342f556
6 files changed
+49
-202
No files matched your search
@@ -15,7 +15,7 @@ jobs:
|
||||
contents: write
|
||||
pages: write
|
||||
id-token: write
|
||||
|
||||
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
@@ -25,7 +25,7 @@ jobs:
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: '3.12'
|
||||
python-version: "3.12"
|
||||
|
||||
- name: Cache pip dependencies
|
||||
uses: actions/cache@v4
|
||||
@@ -61,9 +61,9 @@ jobs:
|
||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
publish_dir: docs/_build
|
||||
force_orphan: true
|
||||
user_name: 'github-actions[bot]'
|
||||
user_email: 'github-actions[bot]@users.noreply.github.com'
|
||||
commit_message: 'Deploy documentation from ${{ github.sha }}'
|
||||
user_name: "github-actions[bot]"
|
||||
user_email: "github-actions[bot]@users.noreply.github.com"
|
||||
commit_message: "Deploy documentation from ${{ github.sha }}"
|
||||
|
||||
docs-quality-check:
|
||||
runs-on: ubuntu-latest
|
||||
@@ -74,7 +74,7 @@ jobs:
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: '3.12'
|
||||
python-version: "3.12"
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
@@ -97,100 +97,3 @@ jobs:
|
||||
cat _build/coverage/python.txt
|
||||
fi
|
||||
continue-on-error: true
|
||||
branches:
|
||||
- main
|
||||
pull_request:
|
||||
branches:
|
||||
- main
|
||||
|
||||
jobs:
|
||||
build-and-deploy-docs:
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: write
|
||||
pages: write
|
||||
id-token: write
|
||||
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: '3.12'
|
||||
|
||||
- name: Cache pip dependencies
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: ~/.cache/pip
|
||||
key: ${{ runner.os }}-pip-docs-${{ hashFiles('docs/requirements.txt') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-pip-docs-
|
||||
${{ runner.os }}-pip-
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
python -m pip install --upgrade pip
|
||||
pip install -e .
|
||||
pip install -r docs/requirements.txt
|
||||
|
||||
- name: Build Sphinx documentation
|
||||
run: |
|
||||
cd docs
|
||||
python -m sphinx -b html . _build -W --keep-going
|
||||
|
||||
- name: Upload documentation artifacts
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: documentation
|
||||
path: docs/_build/
|
||||
retention-days: 30
|
||||
|
||||
- name: Deploy to GitHub Pages
|
||||
if: github.ref == 'refs/heads/main' && github.event_name == 'push'
|
||||
uses: peaceiris/actions-gh-pages@v4
|
||||
with:
|
||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
publish_dir: docs/_build
|
||||
force_orphan: true
|
||||
user_name: 'github-actions[bot]'
|
||||
user_email: 'github-actions[bot]@users.noreply.github.com'
|
||||
commit_message: 'Deploy documentation from ${{ github.sha }}'
|
||||
|
||||
# Job to check documentation links and quality
|
||||
docs-quality-check:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: '3.12'
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
python -m pip install --upgrade pip
|
||||
pip install -e .
|
||||
pip install -r docs/requirements.txt
|
||||
pip install sphinx-linkcheck
|
||||
|
||||
- name: Check documentation links
|
||||
run: |
|
||||
cd docs
|
||||
sphinx-build -b linkcheck . _build/linkcheck -W --keep-going
|
||||
continue-on-error: true
|
||||
|
||||
- name: Check documentation coverage
|
||||
run: |
|
||||
cd docs
|
||||
sphinx-build -b coverage . _build/coverage
|
||||
if [ -f _build/coverage/python.txt ]; then
|
||||
echo "Documentation coverage report:"
|
||||
cat _build/coverage/python.txt
|
||||
fi
|
||||
continue-on-error: true
|
||||
Reference in new issue
Block a user