Skip to content

Merge pull request #47 from koxudaxi/fix-runtime-compatibility #9

Merge pull request #47 from koxudaxi/fix-runtime-compatibility

Merge pull request #47 from koxudaxi/fix-runtime-compatibility #9

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.event_name == 'pull_request_target' && github.event.label.name == 'safe-to-fix' &&
github.event.sender.login == 'koxudaxi')
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
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@v6
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
with:
python-version: "3.14"
- name: Build llms.txt
run: uv run 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