Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/codespell.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,4 @@ jobs:
uses: codespell-project/actions-codespell@v2
with:
exclude_file: CODE_OF_CONDUCT.md
skip: ./docs/cli-reference
skip: ./docs/cli-reference,./docs/llms.txt,./docs/llms-full.txt
72 changes: 72 additions & 0 deletions .github/workflows/llms-txt.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
name: Update llms.txt

on:
push:
branches: [main]
paths:
- 'docs/**/*.md'
- 'zensical.toml'
- 'scripts/build_llms_txt.py'
pull_request:
branches: [main]
paths:
- 'docs/**/*.md'
- 'zensical.toml'
- 'scripts/build_llms_txt.py'
pull_request_target:
types: [labeled]
paths:
- 'docs/**/*.md'
- 'zensical.toml'
- 'scripts/build_llms_txt.py'

permissions:
contents: write

jobs:
update-llms-txt:
if: |
github.event_name == 'push' ||
!github.event.pull_request.head.repo.fork ||
github.actor == 'koxudaxi' ||
github.actor == 'gaborbernat' ||
github.actor == 'ilovelinux' ||
(github.event_name == 'pull_request_target' && github.event.label.name == 'safe-to-fix' &&
(github.event.sender.login == 'koxudaxi' ||
github.event.sender.login == 'gaborbernat' ||
github.event.sender.login == 'ilovelinux'))
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
if: github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name != github.repository
with:
fetch-depth: 0
ref: ${{ github.event.pull_request.head.ref }}
repository: ${{ github.event.pull_request.head.repo.full_name }}
- uses: actions/checkout@v4
if: github.event_name == 'push' || github.event_name == 'pull_request_target' || github.event.pull_request.head.repo.full_name == github.repository
with:
fetch-depth: 0
ref: ${{ github.event.pull_request.head.ref || github.ref }}
repository: ${{ github.event.pull_request.head.repo.full_name || github.repository }}
token: ${{ secrets.PAT }}
- name: Install the latest version of uv
uses: astral-sh/setup-uv@v5
- name: Install tox
run: uv tool install --python-preference only-managed --python 3.13 tox --with tox-uv
- name: Setup environment
run: tox run -vv --notest --skip-missing-interpreters false -e llms-txt
env:
UV_PYTHON_PREFERENCE: "only-managed"
- name: Build llms.txt
run: .tox/llms-txt/bin/python scripts/build_llms_txt.py
- name: Commit and push if changed
if: github.event_name == 'push' || github.event_name == 'pull_request_target' || github.event.pull_request.head.repo.full_name == github.repository
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git add docs/llms.txt docs/llms-full.txt
git diff --staged --quiet || git commit -m "docs: update llms.txt files

Generated by GitHub Actions"
git push
Loading
Loading