Repository navigation
66 lines (56 loc) · 1.84 KB
/
Copy pathdeploy-docs.yml
File metadata and controls
66 lines (56 loc) · 1.84 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
name: Deploy Documentation
on:
push:
branches:
- main
paths: &docs-paths
- 'docs/**'
- 'llms.txt'
- 'mkdocs.yml'
- 'schemas/module-schema.schema.json'
- 'scripts/gen_llms_full.py'
- 'scripts/mkdocs_schemas.py'
- '.github/workflows/deploy-docs.yml'
pull_request:
branches:
- main
paths: *docs-paths
workflow_dispatch:
permissions:
contents: read
concurrency:
group: pages-${{ github.ref }}
cancel-in-progress: false
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
with:
python-version: "3.x"
- run: pip install "mkdocs>=1.6,<2" "mkdocs-material>=9.5,<10" "mkdocs-redirects>=1.2,<2" # material brings PyYAML, used by gen_llms_full.py
- name: Generate LLM discovery files
run: |
# - llms.txt: concise hand-curated index (canonical source at repo root)
# - llms-full.txt: full concatenated docs in nav order (generated, never hand-edited)
cp llms.txt docs/llms.txt
python scripts/gen_llms_full.py
- run: mkdocs build --strict
- uses: actions/upload-pages-artifact@56afc609e74202658d3ffba0e8f6dda462b719fa # v3
if: github.ref == 'refs/heads/main' && github.event_name != 'pull_request'
with:
path: site
deploy:
if: github.ref == 'refs/heads/main' && github.event_name != 'pull_request'
needs: build
runs-on: ubuntu-latest
permissions:
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- id: deployment
uses: actions/deploy-pages@d6db90164ac5ed86f2b6aed7e0febac5b3c0c03e # v4