-
Notifications
You must be signed in to change notification settings - Fork 3
119 lines (105 loc) · 3.28 KB
/
Copy pathdocs.yml
File metadata and controls
119 lines (105 loc) · 3.28 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
# SPDX-FileCopyrightText: 2025-2026 CodeNib Contributors
#
# SPDX-License-Identifier: Apache-2.0
name: Docs
on:
push:
branches:
- main
paths:
- "**.md"
- "docs/**"
- "mkdocs.yml"
- "pyproject.toml"
- "uv.lock"
- "Makefile"
- "codenib/**/*.py"
- "core/**"
- "web/package.json"
- "web/package-lock.json"
- "scripts/check_public_docs.py"
- "scripts/language_capability_matrix.py"
- ".github/workflows/docs.yml"
pull_request:
branches:
- "*"
paths:
- "**.md"
- "docs/**"
- "mkdocs.yml"
- "pyproject.toml"
- "uv.lock"
- "Makefile"
- "codenib/**/*.py"
- "core/**"
- "web/package.json"
- "web/package-lock.json"
- "scripts/check_public_docs.py"
- "scripts/language_capability_matrix.py"
- ".github/workflows/docs.yml"
workflow_dispatch:
permissions:
contents: read
pages: read
concurrency:
group: docs-${{ github.workflow }}-${{ github.ref }}
# Discard stale PR validation, but never interrupt a main/dispatch publish.
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
jobs:
build:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- name: Checkout repository
uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6
- name: Set up uv
uses: astral-sh/setup-uv@11f9893b081a58869d3b5fccaea48c9e9e46f990 # v8.3.2
with:
enable-cache: true
python-version: "3.12"
- name: Install docs dependencies
run: uv sync --locked --only-group docs
- name: Check display branding
run: uv run --no-sync python scripts/check_namespace.py
- name: Check generated capability docs
run: >-
uv run --no-sync python scripts/language_capability_matrix.py
--check docs/language_capabilities.md
- name: Build docs
run: uv run --no-sync mkdocs build --strict
- name: Check public docs boundary
run: uv run --no-sync python scripts/check_public_docs.py
- name: Configure GitHub Pages
if: >-
(github.event_name == 'push' ||
github.event_name == 'workflow_dispatch') &&
github.ref == 'refs/heads/main' &&
github.event.repository.private == false
uses: actions/configure-pages@45bfe0192ca1faeb007ade9deae92b16b8254a0d # v6
- name: Upload GitHub Pages artifact
if: >-
(github.event_name == 'push' ||
github.event_name == 'workflow_dispatch') &&
github.ref == 'refs/heads/main' &&
github.event.repository.private == false
uses: actions/upload-pages-artifact@fc324d3547104276b827a68afc52ff2a11cc49c9 # v5
with:
path: site
deploy:
if: >-
(github.event_name == 'push' ||
github.event_name == 'workflow_dispatch') &&
github.ref == 'refs/heads/main' &&
github.event.repository.private == false
needs: build
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
permissions:
pages: write
id-token: write
steps:
- name: Deploy GitHub Pages
id: deployment
uses: actions/deploy-pages@cd2ce8fcbc39b97be8ca5fce6e763baed58fa128 # v5