Skip to content

[codex] Refresh project usage list (#3072) #181

[codex] Refresh project usage list (#3072)

[codex] Refresh project usage list (#3072) #181

Workflow file for this run

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