Skip to content

Migrate all manual docs to auto generation #90

Migrate all manual docs to auto generation

Migrate all manual docs to auto generation #90

Workflow file for this run

name: PR - Documentations
on:
pull_request:
branches: [main]
types: [opened, reopened, synchronize]
paths:
- "**docs**"
permissions:
contents: read
pull-requests: read
env:
# CI environment configuration
FORCE_COLOR: "1"
jobs:
gatekeeper:
runs-on: ubuntu-latest
concurrency:
group: ${{ github.workflow }}-gate-${{ github.event.pull_request.number }}
cancel-in-progress: true
steps:
- name: Checkout base branch (safe)
uses: actions/checkout@v5
with:
ref: ${{ github.event.pull_request.base.sha }}
fetch-depth: 1
- name: Run permission gate (from base)
uses: ./.github/actions/pr-permission-gate
check-changes:
needs: [gatekeeper]
if: success()
runs-on: ubuntu-latest
concurrency:
group: ${{ github.workflow }}-check-changes-${{ github.event.pull_request.number }}
cancel-in-progress: true
outputs:
docs-change: ${{ steps.changes.outputs.docs-change }}
steps:
- name: Checkout DLC source
uses: actions/checkout@v5
- name: Setup python
uses: actions/setup-python@v6
with:
python-version: "3.12"
- name: Run pre-commit
uses: pre-commit/action@v3.0.1
with:
extra_args: --all-files
- name: Detect file changes
id: changes
uses: dorny/paths-filter@v3
with:
filters: |
docs-change:
- "docs/**"
- "test/docs/**"
- ".github/workflows/pr-docs*"
documentation-test:
needs: [check-changes]
if: needs.check-changes.outputs.docs-change == 'true'
runs-on:
- codebuild-runner-${{ github.run_id }}-${{ github.run_attempt }}
fleet:default-runner
buildspec-override:true
concurrency:
group: ${{ github.workflow }}-docs-test-${{ github.event.pull_request.number }}
cancel-in-progress: true
steps:
- name: Checkout DLC source
uses: actions/checkout@v5
- name: Install test dependencies
run: |
uv venv --python 3.12
source .venv/bin/activate
uv pip install -r test/requirements.txt
- name: Build documentations
run: |
source .venv/bin/activate
uv pip install -r docs/requirements.txt
mkdocs build
- name: Run documentation tests
run: |
source .venv/bin/activate
cd test/
python3 -m pytest -vs -rA docs