-
Notifications
You must be signed in to change notification settings - Fork 69
47 lines (41 loc) · 1.4 KB
/
generate-llms.yaml
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
40
41
42
43
44
45
46
47
name: Generate llms.txt
on:
push:
branches:
- pr-3045-gh-action # Adjust if your default branch has a different name
jobs:
generate-llms:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.x' # Specify the required Python version
- name: Create virtual environment
run: |
python -m venv .venv
source .venv/bin/activate
pip install --upgrade pip
pip install PyYAML # Add other dependencies here if needed
- name: Generate llms.txt
run: |
source .venv/bin/activate
python weave/docs/scripts/generate-llmstxt.py
# Step 6: Verify generated file
- name: Check if llms.txt exists
run: |
if [ ! -f weave/docs/static/llms.txt ]; then
echo "Error: llms.txt was not generated."
exit 1
fi
- name: Commit and push changes
run: |
git config user.name "llms.py GitHub Actions Bot"
git config user.email "[email protected]"
git add weave/docs/static/llms.txt
git diff-index --quiet HEAD || git commit -m "Auto-generate llms.txt"
git push origin test-llmspy-action
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}