Skip to content

Commit abc8a7c

Browse files
committed
try timeout success
1 parent 56d5edb commit abc8a7c

1 file changed

Lines changed: 18 additions & 4 deletions

File tree

.github/workflows/auto-llms-txt.yml

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,9 @@ jobs:
3939
git config user.email "cursoragent@cursor.com"
4040
4141
- name: Update LLMs.txt files
42-
timeout-minutes: 20
42+
timeout-minutes: 1
43+
continue-on-error: true
44+
id: agent_run
4345
env:
4446
MODEL: gpt-5
4547
CURSOR_API_KEY: ${{ secrets.CURSOR_API_KEY }}
@@ -48,8 +50,6 @@ jobs:
4850
run: |
4951
cursor-agent -p "You are operating in a GitHub Actions runner to automatically update llms.txt and llms-full.txt files.
5052
51-
YOU SHOULD TIMEOUT AFTER 2 MINUTES AND THEN EXIT.
52-
5353
The GitHub CLI is available as \`gh\` and authenticated via \`GH_TOKEN\`. Git is available. You have write access to repository contents and can comment on pull requests, but you must not create or edit PRs directly.
5454
5555
# Context:
@@ -105,4 +105,18 @@ jobs:
105105
- If updates needed: Pushed commits to the persistent branch and a PR comment with compare link
106106
- If no updates needed: A brief comment explaining why no updates are required
107107
- Keep all changes minimal and consistent with existing documentation style
108-
" --force --model "$MODEL" --output-format=text
108+
" --force --model "$MODEL" --output-format=text
109+
110+
- name: Handle timeout or completion
111+
if: always()
112+
run: |
113+
if [ "${{ steps.agent_run.outcome }}" == "failure" ]; then
114+
echo "⏰ Agent timed out after 20 minutes - this is expected for long-running analysis"
115+
gh pr comment ${{ github.event.pull_request.number }} --body "⏰ **LLMs.txt Auto-Update Timeout**
116+
117+
The automated analysis timed out after 20 minutes. This can happen with large documentation changes. The process has been stopped safely." || true
118+
else
119+
echo "✅ Agent completed successfully"
120+
fi
121+
env:
122+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)