Make specfact upgrade install-method-aware (uv/uvx support, pipx/pip detection)
#312
This file contains hidden or 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
| # yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json | |
| # yamllint disable rule:line-length rule:truthy | |
| name: Docs Review | |
| on: | |
| pull_request: | |
| branches: [main, dev] | |
| paths: | |
| - "**/*.md" | |
| - "**/*.mdc" | |
| - "docs/**" | |
| - "docs/.doc-frontmatter-enforced" | |
| - "tests/unit/docs/**" | |
| - "tests/unit/scripts/test_doc_frontmatter/**" | |
| - "tests/integration/scripts/test_doc_frontmatter/**" | |
| - "tests/helpers/doc_frontmatter.py" | |
| - "tests/helpers/doc_frontmatter_fixtures.py" | |
| - "tests/helpers/doc_frontmatter_types.py" | |
| - "scripts/check-docs-commands.py" | |
| - "scripts/check-cross-site-links.py" | |
| - "scripts/check_doc_frontmatter.py" | |
| - "scripts/validate_agent_rule_applies_when.py" | |
| - "scripts/check_version_sources.py" | |
| - "docs/agent-rules/INDEX.md" | |
| - "pyproject.toml" | |
| - ".github/workflows/docs-review.yml" | |
| push: | |
| branches: [main, dev] | |
| paths: | |
| - "**/*.md" | |
| - "**/*.mdc" | |
| - "docs/**" | |
| - "docs/.doc-frontmatter-enforced" | |
| - "tests/unit/docs/**" | |
| - "tests/unit/scripts/test_doc_frontmatter/**" | |
| - "tests/integration/scripts/test_doc_frontmatter/**" | |
| - "tests/helpers/doc_frontmatter.py" | |
| - "tests/helpers/doc_frontmatter_fixtures.py" | |
| - "tests/helpers/doc_frontmatter_types.py" | |
| - "scripts/check-docs-commands.py" | |
| - "scripts/check-cross-site-links.py" | |
| - "scripts/check_doc_frontmatter.py" | |
| - "scripts/validate_agent_rule_applies_when.py" | |
| - "scripts/check_version_sources.py" | |
| - "docs/agent-rules/INDEX.md" | |
| - "pyproject.toml" | |
| - ".github/workflows/docs-review.yml" | |
| workflow_dispatch: | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
| cancel-in-progress: true | |
| permissions: | |
| contents: read | |
| jobs: | |
| docs-review: | |
| name: Docs Review | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Python 3.12 | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.12" | |
| cache: "pip" | |
| - name: Install Hatch | |
| run: | | |
| python -m pip install --upgrade pip | |
| python -m pip install hatch | |
| - name: Create hatch environment | |
| run: hatch env create | |
| - name: Validate docs command examples | |
| run: hatch run check-docs-commands | |
| - name: Cross-site links (warn-only; live site may lag deploys) | |
| continue-on-error: true | |
| run: hatch run check-cross-site-links --warn-only | |
| - name: Validate documentation frontmatter (enforced paths; aligns with local docs-validate / pre-commit) | |
| run: hatch run doc-frontmatter-check | |
| - name: Validate agent-rules applies_when canonical task signals | |
| run: hatch run validate-agent-rule-signals | |
| - name: Run docs review test suites | |
| run: | | |
| mkdir -p logs/docs-review | |
| DOCS_REVIEW_LOG="logs/docs-review/docs-review_$(date -u +%Y%m%d_%H%M%S).log" | |
| hatch run pytest tests/unit/docs/ tests/unit/scripts/test_doc_frontmatter/ tests/integration/scripts/test_doc_frontmatter/ -q 2>&1 | tee "$DOCS_REVIEW_LOG" | |
| exit "${PIPESTATUS[0]:-$?}" | |
| - name: Upload docs review logs | |
| if: always() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: docs-review-logs | |
| path: logs/docs-review/ | |
| if-no-files-found: ignore |