Skip to content

docs: Add TypeScript SDK reference documentation #90

docs: Add TypeScript SDK reference documentation

docs: Add TypeScript SDK reference documentation #90

Workflow file for this run

name: Generate LLMs.txt
on:
workflow_dispatch:
pull_request:
types: [opened, synchronize, reopened]
permissions:
contents: write
pull-requests: write
jobs:
llmstxt:
name: Generate LLMSTXT
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
steps:
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: "22.x"
- name: Checkout code
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.ref || github.ref }}
token: ${{ secrets.DOCS_PUBLISHABLE_GH_TOKEN }}
- name: Install dependencies
run: npm install -g pnpm
- name: Install pnpm
run: pnpm install
- name: generate LLMs.txt
run: pnpm llmstxt
env:
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
- name: Check for changes
id: check-changes
run: |
if [ -n "$(git status --porcelain)" ]; then
echo "has_changes=true" >> $GITHUB_OUTPUT
else
echo "has_changes=false" >> $GITHUB_OUTPUT
fi
- name: Commit changes to PR
if: steps.check-changes.outputs.has_changes == 'true' && github.event_name == 'pull_request'
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git add public/llms.txt
git commit -m "🤖 Regenerate LLMs.txt"
git push
- name: Create Pull Request (for scheduled/manual runs)
if: steps.check-changes.outputs.has_changes == 'true' && github.event_name != 'pull_request'
id: cpr
uses: peter-evans/create-pull-request@v7
with:
token: ${{ secrets.DOCS_PUBLISHABLE_GH_TOKEN }}
commit-message: Regenerate LLMs.txt and related files
branch: auto-update-llms-txt
delete-branch: true
title: "🤖 Regenerate LLMs.txt"
reviewers: >
evantahler
torresmateo
- name: Enable Pull Request Automerge
if: steps.check-changes.outputs.has_changes == 'true' && github.event_name != 'pull_request'
run: gh pr merge --squash --auto ${{ steps.cpr.outputs.pull-request-number }}
env:
GH_TOKEN: ${{ secrets.DOCS_PUBLISHABLE_GH_TOKEN }}