Repository navigation
67 lines (63 loc) · 2.3 KB
/
Copy pathdocs-pr.yml
File metadata and controls
67 lines (63 loc) · 2.3 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
name: Docs PR checks
on:
pull_request:
branches: [main]
paths:
- 'src/**'
- 'docs/**'
- 'overrides/**'
- 'mkdocs.yml'
- 'pyproject.toml'
- 'requirements-docs.txt'
- 'scripts/prepare_portal.py'
- 'scripts/check-docs-analytics.py'
- 'scripts/check-docs-layout.py'
- 'scripts/docstring_cross_references.py'
- '.github/workflows/docs-pr.yml'
- '.github/workflows/docs.yml'
permissions:
contents: read
concurrency:
group: docs-pr-${{ github.event.pull_request.number }}
cancel-in-progress: true
jobs:
validate:
name: Build and check the developer portal
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6
with:
persist-credentials: false
- uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6
with:
python-version: "3.12"
- name: Bootstrap patched pip trust
uses: durable-workflow/.github/.github/actions/bootstrap-patched-pip@75587fc33ff40c34f32ef777293dad56bb6f48c7 # clean-trust
with:
clients: pip,python
- name: Install pinned documentation dependencies
run: |
pip install --require-hashes --only-binary=:all: -r requirements-docs.txt
- name: Install Chromium
env:
NODE_OPTIONS: --use-openssl-ca
NODE_EXTRA_CA_CERTS: ''
NODE_USE_SYSTEM_CA: '0'
NODE_TLS_REJECT_UNAUTHORIZED: '1'
run: python -m playwright install chromium
- name: Build and check the portal
run: |
python scripts/prepare_portal.py
mkdocs build --strict --config-file .docs-build.yml
python scripts/docstring_cross_references.py --site site
python scripts/check-docs-analytics.py site
python scripts/check-docs-layout.py site --screenshots docs-review
cp .docs-provenance.json docs-review/deployment-audit.json
cp .docs-api-inventory.json docs-review/api-source-inventory.json
- name: Retain rendered review screenshots
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7
with:
name: python-portal-review-${{ github.sha }}
path: docs-review
retention-days: 7