Repository navigation
71 lines (57 loc) · 1.99 KB
/
Copy pathconformance-docs.yml
File metadata and controls
71 lines (57 loc) · 1.99 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
name: Conformance docs
on:
workflow_call:
push:
branches: [main]
paths:
- 'conformance/**'
- '.github/workflows/conformance-docs.yml'
pull_request:
paths:
- 'conformance/**'
- '.github/workflows/conformance-docs.yml'
workflow_dispatch:
permissions:
contents: read
concurrency:
group: conformance-docs-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: false
jobs:
deploy:
name: Build conformance docs
defaults:
run:
working-directory: conformance
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
fetch-depth: 0
- uses: actions/setup-python@6d4fd22b20465ccc0f7354476588e8df7c9ca0e0 # v7.1.0
with:
python-version: "3.11"
cache: pip
- name: Install docs dependencies
run: |
pip install --require-hashes -r requirements/docs.txt
pip install --no-deps -e .
- name: Assemble docs build directory
run: |
BUILD=.docs_build
mkdir -p $BUILD
if [ -d docs ]; then cp -r docs $BUILD/docs; fi
# measurement/REPORT.md is in the nav as Self-verification.
if [ -d measurement ]; then cp -r measurement $BUILD/measurement; fi
for fname in index.md CHANGELOG.md CONTRIBUTING.md CODE_OF_CONDUCT.md LIMITATIONS.md SPONSORS.md PRIVACY.md CNAME robots.txt; do
if [ -f "$fname" ]; then cp "$fname" "$BUILD/$fname"; fi
done
echo "Build dir contains $(find $BUILD -type f | wc -l) files"
- name: Generate build config
run: |
sed 's|^docs_dir: \.$|docs_dir: .docs_build|' mkdocs.yml > .mkdocs_build.yml
- name: Build documentation
run: mkdocs build --clean --config-file .mkdocs_build.yml
- uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
with:
name: conformance-docs
path: conformance/site/