Skip to content

Commit 21fc49f

Browse files
authored
Merge pull request #24 from koxudaxi/feat/llms-txt-docs-tooling
Add llms.txt generation, docs version updater, and CHANGELOG integration
2 parents 9712e21 + 350d7c0 commit 21fc49f

9 files changed

Lines changed: 1813 additions & 68 deletions

File tree

.github/workflows/docs.yaml

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: Docs
22

33
on:
44
pull_request:
5-
paths: ['docs/**', 'examples/**', 'zensical.toml', 'overrides/**', 'README.md', 'CONTRIBUTING.md', 'pyproject.toml', 'uv.lock']
5+
paths: ['docs/**', 'examples/**', 'zensical.toml', 'overrides/**', 'README.md', 'CONTRIBUTING.md', 'pyproject.toml', 'uv.lock', 'CHANGELOG.md']
66
push:
77
branches:
88
- main
@@ -29,6 +29,19 @@ jobs:
2929
python-version: "3.14"
3030
- name: Install dependencies
3131
run: uv sync --only-group docs
32+
- name: Copy CHANGELOG to docs
33+
run: |
34+
if [ -f CHANGELOG.md ]; then
35+
cp CHANGELOG.md docs/changelog.md
36+
else
37+
echo "# Changelog" > docs/changelog.md
38+
echo "" >> docs/changelog.md
39+
echo "Changelog will be available after the first release." >> docs/changelog.md
40+
fi
41+
- name: Update docs version
42+
run: uv run python scripts/update_docs_version.py
43+
env:
44+
GH_TOKEN: ${{ github.token }}
3245
- name: build site
3346
run: uv run --only-group docs zensical build --clean
3447

.github/workflows/llms-txt.yaml

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
name: Update llms.txt
2+
3+
on:
4+
push:
5+
branches: [main]
6+
paths:
7+
- 'docs/**/*.md'
8+
- 'zensical.toml'
9+
- 'scripts/build_llms_txt.py'
10+
pull_request:
11+
branches: [main]
12+
paths:
13+
- 'docs/**/*.md'
14+
- 'zensical.toml'
15+
- 'scripts/build_llms_txt.py'
16+
pull_request_target:
17+
types: [labeled]
18+
paths:
19+
- 'docs/**/*.md'
20+
- 'zensical.toml'
21+
- 'scripts/build_llms_txt.py'
22+
23+
permissions:
24+
contents: write
25+
26+
jobs:
27+
update-llms-txt:
28+
if: |
29+
github.event_name == 'push' ||
30+
!github.event.pull_request.head.repo.fork ||
31+
github.actor == 'koxudaxi' ||
32+
(github.event_name == 'pull_request_target' && github.event.label.name == 'safe-to-fix' &&
33+
github.event.sender.login == 'koxudaxi')
34+
runs-on: ubuntu-latest
35+
steps:
36+
- uses: actions/checkout@v4
37+
if: github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name != github.repository
38+
with:
39+
fetch-depth: 0
40+
ref: ${{ github.event.pull_request.head.ref }}
41+
repository: ${{ github.event.pull_request.head.repo.full_name }}
42+
- uses: actions/checkout@v4
43+
if: github.event_name == 'push' || github.event_name == 'pull_request_target' || github.event.pull_request.head.repo.full_name == github.repository
44+
with:
45+
fetch-depth: 0
46+
ref: ${{ github.event.pull_request.head.ref || github.ref }}
47+
repository: ${{ github.event.pull_request.head.repo.full_name || github.repository }}
48+
token: ${{ secrets.PAT }}
49+
- name: Install the latest version of uv
50+
uses: astral-sh/setup-uv@v5
51+
with:
52+
python-version: "3.14"
53+
- name: Build llms.txt
54+
run: uv run python scripts/build_llms_txt.py
55+
- name: Commit and push if changed
56+
if: github.event_name == 'push' || github.event_name == 'pull_request_target' || github.event.pull_request.head.repo.full_name == github.repository
57+
run: |
58+
git config user.name "github-actions[bot]"
59+
git config user.email "github-actions[bot]@users.noreply.github.com"
60+
git add docs/llms.txt docs/llms-full.txt
61+
git diff --staged --quiet || git commit -m "docs: update llms.txt files
62+
63+
Generated by GitHub Actions"
64+
git push

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -213,3 +213,6 @@ cython_debug/
213213
marimo/_static/
214214
marimo/_lsp/
215215
__marimo__/
216+
217+
# Docs build artifacts
218+
docs/changelog.md

CHANGELOG.md

Lines changed: 1 addition & 66 deletions
Original file line numberDiff line numberDiff line change
@@ -3,29 +3,6 @@
33
All notable changes to this project are documented in this file.
44
This changelog is automatically generated from GitHub Releases.
55

6-
---
7-
## [0.1.1](https://github.com/koxudaxi/tstring-structured-data/releases/tag/0.1.1) - 2026-03-18
8-
9-
## What's Changed
10-
* build(deps): bump actions/download-artifact from 4 to 8 by @dependabot[bot] in https://github.com/koxudaxi/tstring-structured-data/pull/2
11-
* Add documentation site with Zensical and Cloudflare Pages by @koxudaxi in https://github.com/koxudaxi/tstring-structured-data/pull/13
12-
* feat: add Rust backend check and format APIs by @koxudaxi in https://github.com/koxudaxi/tstring-structured-data/pull/12
13-
* Align release workflows with datamodel-code-generator by @koxudaxi in https://github.com/koxudaxi/tstring-structured-data/pull/14
14-
* Limit release draft analysis input context by @koxudaxi in https://github.com/koxudaxi/tstring-structured-data/pull/15
15-
* Pin Claude base action to existing release by @koxudaxi in https://github.com/koxudaxi/tstring-structured-data/pull/16
16-
* Adapt release draft to Claude base action inputs by @koxudaxi in https://github.com/koxudaxi/tstring-structured-data/pull/17
17-
* Update Claude base action to current main commit by @koxudaxi in https://github.com/koxudaxi/tstring-structured-data/pull/18
18-
* Restore Claude action and filter bot comments by @koxudaxi in https://github.com/koxudaxi/tstring-structured-data/pull/19
19-
* Align release draft workflow with datamodel-code-generator by @koxudaxi in https://github.com/koxudaxi/tstring-structured-data/pull/20
20-
* Lockstep versioning by @koxudaxi in https://github.com/koxudaxi/tstring-structured-data/pull/21
21-
* Allow dirty tree in Rust release workflow by @koxudaxi in https://github.com/koxudaxi/tstring-structured-data/pull/22
22-
* Run Python publish automatically on release tags by @koxudaxi in https://github.com/koxudaxi/tstring-structured-data/pull/23
23-
24-
## New Contributors
25-
* @dependabot[bot] made their first contribution in https://github.com/koxudaxi/tstring-structured-data/pull/2
26-
27-
**Full Changelog**: https://github.com/koxudaxi/tstring-structured-data/compare/0.1.0...0.1.1
28-
296
---
307

318
## [0.1.1](https://github.com/koxudaxi/tstring-structured-data/releases/tag/0.1.1) - 2026-03-18
@@ -43,6 +20,7 @@ This changelog is automatically generated from GitHub Releases.
4320
* Align release draft workflow with datamodel-code-generator by @koxudaxi in https://github.com/koxudaxi/tstring-structured-data/pull/20
4421
* Lockstep versioning by @koxudaxi in https://github.com/koxudaxi/tstring-structured-data/pull/21
4522
* Allow dirty tree in Rust release workflow by @koxudaxi in https://github.com/koxudaxi/tstring-structured-data/pull/22
23+
* Run Python publish automatically on release tags by @koxudaxi in https://github.com/koxudaxi/tstring-structured-data/pull/23
4624

4725
## New Contributors
4826
* @dependabot[bot] made their first contribution in https://github.com/koxudaxi/tstring-structured-data/pull/2
@@ -51,49 +29,6 @@ This changelog is automatically generated from GitHub Releases.
5129

5230
---
5331

54-
## [0.1.1](https://github.com/koxudaxi/tstring-structured-data/releases/tag/0.1.1) - 2026-03-18
55-
56-
## What's Changed
57-
* build(deps): bump actions/download-artifact from 4 to 8 by @dependabot[bot] in https://github.com/koxudaxi/tstring-structured-data/pull/2
58-
* Add documentation site with Zensical and Cloudflare Pages by @koxudaxi in https://github.com/koxudaxi/tstring-structured-data/pull/13
59-
* feat: add Rust backend check and format APIs by @koxudaxi in https://github.com/koxudaxi/tstring-structured-data/pull/12
60-
* Align release workflows with datamodel-code-generator by @koxudaxi in https://github.com/koxudaxi/tstring-structured-data/pull/14
61-
* Limit release draft analysis input context by @koxudaxi in https://github.com/koxudaxi/tstring-structured-data/pull/15
62-
* Pin Claude base action to existing release by @koxudaxi in https://github.com/koxudaxi/tstring-structured-data/pull/16
63-
* Adapt release draft to Claude base action inputs by @koxudaxi in https://github.com/koxudaxi/tstring-structured-data/pull/17
64-
* Update Claude base action to current main commit by @koxudaxi in https://github.com/koxudaxi/tstring-structured-data/pull/18
65-
* Restore Claude action and filter bot comments by @koxudaxi in https://github.com/koxudaxi/tstring-structured-data/pull/19
66-
* Align release draft workflow with datamodel-code-generator by @koxudaxi in https://github.com/koxudaxi/tstring-structured-data/pull/20
67-
* Lockstep versioning by @koxudaxi in https://github.com/koxudaxi/tstring-structured-data/pull/21
68-
69-
## New Contributors
70-
* @dependabot[bot] made their first contribution in https://github.com/koxudaxi/tstring-structured-data/pull/2
71-
72-
**Full Changelog**: https://github.com/koxudaxi/tstring-structured-data/compare/0.1.0...0.1.1
73-
74-
---
75-
76-
## [0.1.1](https://github.com/koxudaxi/tstring-structured-data/releases/tag/0.1.1) - 2026-03-18
77-
78-
## What's Changed
79-
* build(deps): bump actions/download-artifact from 4 to 8 by @dependabot[bot] in https://github.com/koxudaxi/tstring-structured-data/pull/2
80-
* Add documentation site with Zensical and Cloudflare Pages by @koxudaxi in https://github.com/koxudaxi/tstring-structured-data/pull/13
81-
* feat: add Rust backend check and format APIs by @koxudaxi in https://github.com/koxudaxi/tstring-structured-data/pull/12
82-
* Align release workflows with datamodel-code-generator by @koxudaxi in https://github.com/koxudaxi/tstring-structured-data/pull/14
83-
* Limit release draft analysis input context by @koxudaxi in https://github.com/koxudaxi/tstring-structured-data/pull/15
84-
* Pin Claude base action to existing release by @koxudaxi in https://github.com/koxudaxi/tstring-structured-data/pull/16
85-
* Adapt release draft to Claude base action inputs by @koxudaxi in https://github.com/koxudaxi/tstring-structured-data/pull/17
86-
* Update Claude base action to current main commit by @koxudaxi in https://github.com/koxudaxi/tstring-structured-data/pull/18
87-
* Restore Claude action and filter bot comments by @koxudaxi in https://github.com/koxudaxi/tstring-structured-data/pull/19
88-
* Align release draft workflow with datamodel-code-generator by @koxudaxi in https://github.com/koxudaxi/tstring-structured-data/pull/20
89-
90-
## New Contributors
91-
* @dependabot[bot] made their first contribution in https://github.com/koxudaxi/tstring-structured-data/pull/2
92-
93-
**Full Changelog**: https://github.com/koxudaxi/tstring-structured-data/compare/0.1.0...0.1.1
94-
95-
---
96-
9732
## [0.1.0](https://github.com/koxudaxi/tstring-structured-data/releases/tag/0.1.0) - 2026-03-18
9833

9934
<!--

0 commit comments

Comments
 (0)