it was an underscore, not a hyphen #10
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: Generate llms.txt | |
on: | |
push: | |
branches: | |
- pr-3045-gh-action | |
jobs: | |
generate-llms: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Debug path issues | |
run: | | |
echo "Current directory: $(pwd)" | |
echo "GitHub workspace: $GITHUB_WORKSPACE" | |
if [ "$(pwd)" != "$GITHUB_WORKSPACE" ]; then | |
echo "Error: Current directory does not match \$GITHUB_WORKSPACE" | |
exit 1 | |
fi | |
- name: List directory contents | |
run: ls -R | |
- name: Debug script path | |
run: | | |
ls -l $GITHUB_WORKSPACE/docs/scripts/generate-llmstxt.py | |
- name: Debug Python version | |
run: | | |
source .venv/bin/activate | |
python --version | |
- name: Check active Python environment | |
run: | | |
source .venv/bin/activate | |
which python | |
- name: Fix script permissions | |
run: chmod +rx $GITHUB_WORKSPACE/docs/scripts/generate-llmstxt.py | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.x' | |
- 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 $GITHUB_WORKSPACE/docs/scripts/generate_llmstxt.py | |
- 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 }} |