Skip to content

Commit 59f2ee8

Browse files
committed
LLMs.txt generation on every PR
1 parent a7314b8 commit 59f2ee8

File tree

3 files changed

+304
-38
lines changed

3 files changed

+304
-38
lines changed

.github/workflows/llmstxt.yml

Lines changed: 25 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
name: Generate LLMs.txt
22

33
on:
4-
schedule:
5-
- cron: "0 0 * * 0" # Run at 00:00 every Sunday
64
workflow_dispatch:
5+
pull_request:
6+
types: [opened, synchronize, reopened]
77

88
permissions:
99
contents: write
@@ -27,7 +27,8 @@ jobs:
2727
- name: Checkout code
2828
uses: actions/checkout@v4
2929
with:
30-
ref: main
30+
ref: ${{ github.event.pull_request.head.ref || github.ref }}
31+
token: ${{ secrets.DOCS_PUBLISHABLE_GH_TOKEN }}
3132

3233
- name: Install dependencies
3334
run: npm install -g pnpm
@@ -40,8 +41,26 @@ jobs:
4041
env:
4142
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
4243

43-
# commit the changes and make a PR (branch protection)
44-
- name: Create Pull Request
44+
- name: Check for changes
45+
id: check-changes
46+
run: |
47+
if [ -n "$(git status --porcelain)" ]; then
48+
echo "has_changes=true" >> $GITHUB_OUTPUT
49+
else
50+
echo "has_changes=false" >> $GITHUB_OUTPUT
51+
fi
52+
53+
- name: Commit changes to PR
54+
if: steps.check-changes.outputs.has_changes == 'true' && github.event_name == 'pull_request'
55+
run: |
56+
git config user.name "github-actions[bot]"
57+
git config user.email "github-actions[bot]@users.noreply.github.com"
58+
git add public/llms.txt
59+
git commit -m "🤖 Regenerate LLMs.txt"
60+
git push
61+
62+
- name: Create Pull Request (for scheduled/manual runs)
63+
if: steps.check-changes.outputs.has_changes == 'true' && github.event_name != 'pull_request'
4564
id: cpr
4665
uses: peter-evans/create-pull-request@v7
4766
with:
@@ -55,6 +74,7 @@ jobs:
5574
torresmateo
5675
5776
- name: Enable Pull Request Automerge
77+
if: steps.check-changes.outputs.has_changes == 'true' && github.event_name != 'pull_request'
5878
run: gh pr merge --squash --auto ${{ steps.cpr.outputs.pull-request-number }}
5979
env:
6080
GH_TOKEN: ${{ secrets.DOCS_PUBLISHABLE_GH_TOKEN }}

public/llms.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
<!-- git-sha: a7314b83dfefc49190e81f6ee1a83580c52cb137 generation-date: 2025-11-04T21:39:10.093Z -->
2+
13
# Arcade
24

35
> Arcade is an AI Tool-calling Platform. For the first time, AI can securely act on behalf of users through Arcade's authenticated integrations, or "tools" in AI lingo. Connect AI to email, files, calendars, and APIs to build assistants that don't just chat - they get work done. Start building in minutes with our pre-built connectors or custom SDK.

0 commit comments

Comments
 (0)