-
Notifications
You must be signed in to change notification settings - Fork 579
39 lines (32 loc) · 1.11 KB
/
llm-docs.yml
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
name: LLM Docs Update
on:
workflow_dispatch: # Allows manual triggering
schedule:
- cron: '0 0 * * *' # Runs daily at midnight UTC
jobs:
update-llms:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Compile llms.txt
run: |
# Concatenate all the markdown docs, minus everything after "## Contributors" in README.md, and write to docs/llms.txt
(sed '/## Contributors/q' README.md; for file in docs/*.md; do echo -e "\n\n\n\n\n---\n\n\n\n\n"; cat "$file"; done) > docs/llms.txt
- name: Check for changes
run: |
if git diff --quiet; then
echo "No changes to llms.txt; exiting."
exit 0
else
echo "Changes detected in llms.txt."
fi
- name: Commit and push changes
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
git config user.name "${{ github.actor }}"
git config user.email "${{ github.actor }}@users.noreply.github.com"
git add docs/llms.txt
git commit -m "Update llms.txt"
git push origin main