Repository navigation
131 lines (112 loc) · 3.33 KB
/
Copy pathinfra-docs.yml
File metadata and controls
131 lines (112 loc) · 3.33 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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
name: Deploy Documentation
on:
push:
branches: [ main ]
paths:
- 'docs/**'
- 'examples/**'
- 'scripts/inference/**'
- 'docs-site/**'
- 'fastvideo/**'
- 'README.md'
- 'requirements-docs.in'
- 'requirements-docs.txt'
- 'scripts/check_docs_links.py'
- '.github/workflows/infra-docs.yml'
pull_request:
branches: [ main ]
paths:
- 'docs/**'
- 'examples/**'
- 'scripts/inference/**'
- 'docs-site/**'
- 'fastvideo/**'
- 'README.md'
- 'requirements-docs.in'
- 'requirements-docs.txt'
- 'scripts/check_docs_links.py'
- '.github/workflows/infra-docs.yml'
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: "pages"
cancel-in-progress: false
jobs:
build:
timeout-minutes: 15
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Install uv
uses: astral-sh/setup-uv@v3
- name: Install dependencies
run: uv pip install --system -r requirements-docs.txt
- name: Setup Pages
uses: actions/configure-pages@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '24'
cache: npm
cache-dependency-path: |
docs/package-lock.json
docs-site/package-lock.json
- name: Install cookbook dependencies
run: |
npm ci --prefix docs
npm ci --prefix docs-site
- name: Validate and generate cookbook catalogs
run: |
npm run check:cookbook --prefix docs
npm run test:cookbook --prefix docs
python docs/tests/test_cookbook_assets.py
npm run build:catalog --prefix docs
- name: Check site types and formatting
run: |
npm run check --prefix docs-site
npm run format:check --prefix docs-site
- name: Build and validate documentation
run: |
npm run build --prefix docs-site
npm run validate --prefix docs-site
npm run test:content --prefix docs-site
python -m unittest discover -s docs-site/tests -p 'test_*.py'
python docs/check_cookbook_assets.py docs-site/dist
- name: Install test browser
working-directory: docs-site
run: npx playwright install --with-deps chromium
- name: Test documentation and cookbook interactions
run: npm test --prefix docs-site
- name: Check docs links
run: python scripts/check_docs_links.py
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: ./docs-site/dist
- name: Upload browser failure traces
if: failure()
uses: actions/upload-artifact@v4
with:
name: docs-browser-results
path: docs-site/test-results
if-no-files-found: ignore
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build
if: github.ref == 'refs/heads/main'
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4