Skip to content

Исправление ошибки неизвестного enum #16

Исправление ошибки неизвестного enum

Исправление ошибки неизвестного enum #16

Workflow file for this run

name: Docs
on:
push:
branches:
- main
- master
tags:
- "v*"
pull_request:
permissions:
contents: read
pages: write
id-token: write
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Python 3.14
uses: actions/setup-python@v5
with:
python-version: "3.14"
- name: Install Poetry
uses: snok/install-poetry@v1
with:
virtualenvs-create: true
virtualenvs-in-project: true
- name: Install docs dependencies
run: poetry install --no-interaction --with docs
- name: Build docs (strict)
run: make docs-strict
- name: Build docs reports
run: |
poetry run python scripts/check_inventory_coverage.py --output inventory-coverage-report.json
poetry run python scripts/check_spec_inventory_sync.py --output spec-inventory-report.json
poetry run python scripts/check_reference_public_surface.py --output reference-public-report.json
poetry run python scripts/check_public_docstrings.py --output docstring-contract-report.json
poetry run python scripts/check_changelog_sections.py --output changelog-sections-report.json
poetry run bandit -r avito -lll -f json -o bandit-report.json
poetry run python scripts/build_docs_quality_report.py \
--inventory-report inventory-coverage-report.json \
--spec-report spec-inventory-report.json \
--reference-report reference-public-report.json \
--docstring-report docstring-contract-report.json \
--changelog-report changelog-sections-report.json \
--bandit-report bandit-report.json \
--output docs-quality-report.json
- name: Prepare local docs root for link checking
run: ln -s . site/avito_python_api
- name: Upload docs reports
uses: actions/upload-artifact@v4
with:
name: docs-contract-reports
path: |
inventory-coverage-report.json
spec-inventory-report.json
reference-public-report.json
docstring-contract-report.json
changelog-sections-report.json
bandit-report.json
docs-quality-report.json
- name: Check links
uses: lycheeverse/lychee-action@v2
env:
GITHUB_TOKEN: ${{ github.token }}
with:
args: --root-dir "${{ github.workspace }}/site" --exclude "avito\.ru" --exclude "^https://p141592\.github\.io/avito_python_api/" --retry-wait-time 5 --max-retries 3 --timeout 30 site/
deploy:
runs-on: ubuntu-latest
needs: build
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Python 3.14
uses: actions/setup-python@v5
with:
python-version: "3.14"
- name: Install Poetry
uses: snok/install-poetry@v1
with:
virtualenvs-create: true
virtualenvs-in-project: true
- name: Install docs dependencies
run: poetry install --no-interaction --with docs
- name: Verify tag belongs to main
run: |
git fetch origin main
git merge-base --is-ancestor "$GITHUB_SHA" origin/main
- name: Build site for GitHub Pages
run: make docs-strict
- name: Upload Pages artifact
uses: actions/upload-pages-artifact@v3
with:
path: site
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4