-
Notifications
You must be signed in to change notification settings - Fork 67
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Missed adding the updated toml and the action
- Loading branch information
Showing
2 changed files
with
51 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,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 | ||
|
||
# Step 3: Install Hatch | ||
- name: Install Hatch | ||
run: pip install hatch | ||
|
||
# Step 4: Install dependencies for docs | ||
- name: Install documentation dependencies | ||
run: hatch env create llmspy | ||
|
||
# Step 5: Run the script | ||
- name: Generate llms.txt | ||
run: hatch run llmspy python weave/docs/scripts/generate-llmstxt.py | ||
|
||
# Step 6: Verify generated file (optional) | ||
- 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 }} |
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