chore(deps): update dependency python to 3.13 #12
This file contains hidden or 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: Update llms.txt | |
on: | |
push: | |
branches: [main, master] | |
pull_request: | |
branches: [main, master] | |
workflow_dispatch: # Allow manual triggering | |
permissions: | |
contents: write | |
jobs: | |
update-llms: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: "3.13" | |
cache: "pip" | |
- name: Install llmstxt tool | |
run: | | |
python -m venv .venv | |
. .venv/bin/activate | |
python -m pip install --upgrade pip | |
pip install git+https://github.com/ngmisl/llmstxt.git | |
- name: Generate llms.txt | |
run: | | |
. .venv/bin/activate | |
# Remove existing llms.txt if it exists | |
rm -f llms.txt | |
# Generate new llms.txt | |
python -c "from llmstxt import generate_llms_txt; generate_llms_txt()" | |
- name: Configure Git | |
run: | | |
git config --local user.email "github-actions[bot]@users.noreply.github.com" | |
git config --local user.name "github-actions[bot]" | |
- name: Commit and push changes | |
run: | | |
git add llms.txt | |
if git diff --staged --quiet; then | |
echo "No changes to commit" | |
else | |
git commit -m "chore: update llms.txt" | |
git push | |
fi |