LLM Docs Update #2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |