Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 36 additions & 0 deletions .github/workflows/D-deploy-to-gh-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,42 @@ jobs:



##############################
# Generate LLM-optimized docs (llmstxt.org standard)
# Uses build directory discovery since keridoc uses autogenerated sidebars
- name: Generate LLM documentation
uses: osodevops/docusaurus-llm-docs@v1
id: llm-docs
with:
build-dir: './build'
output-dir: './build/llm-docs'
base-url: 'https://weboftrust.github.io/keridoc'
product-name: 'KERIDoc'
tagline: 'KERI Suite Documentation'
inject-sidebar: 'false'
sidebar-path: './sidebars-nonexistent.js'

- name: Copy LLM docs to build root and repo
run: |
cp ${{ steps.llm-docs.outputs.llms-txt-path }} ./build/llms.txt
cp ${{ steps.llm-docs.outputs.llms-full-txt-path }} ./build/llms-full.txt
cp ${{ steps.llm-docs.outputs.markdown-zip-path }} ./build/markdown.zip
mkdir -p ./llm-docs
cp ${{ steps.llm-docs.outputs.llms-txt-path }} ./llm-docs/llms.txt
cp ${{ steps.llm-docs.outputs.llms-full-txt-path }} ./llm-docs/llms-full.txt
cp ${{ steps.llm-docs.outputs.markdown-zip-path }} ./llm-docs/markdown.zip

- name: Commit LLM docs to repo
run: |
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git add llm-docs/
git diff --staged --quiet && echo "No changes to commit" || git commit -m "Update LLM-optimized documentation [automated]"
git push
##############################



##############################
# Docs: https://github.com/peaceiris/actions-gh-pages#%EF%B8%8F-docusaurus
- name: Deploy to GitHub Pages
Expand Down
60 changes: 60 additions & 0 deletions .github/workflows/generate-llm-docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: Generate LLM Documentation

on:
push:
branches: [main]
paths:
- 'docs/**'
- 'docusaurus.config.js'
- 'sidebars.js'
workflow_dispatch:

permissions:
contents: write

jobs:
generate-llm-docs:
name: Build site and generate LLM-optimized docs
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'npm'

- name: Install dependencies
run: npm ci

- name: Build website
run: npm run build

- name: Generate LLM documentation
uses: osodevops/docusaurus-llm-docs@v1
id: llm-docs
with:
build-dir: './build'
output-dir: './build/llm-docs'
base-url: 'https://weboftrust.github.io/keridoc'
product-name: 'KERIDoc'
tagline: 'KERI Suite Documentation'
inject-sidebar: 'false'
sidebar-path: './sidebars-nonexistent.js'

- name: Copy LLM docs to build output
run: |
cp ${{ steps.llm-docs.outputs.llms-txt-path }} ./build/llms.txt
cp ${{ steps.llm-docs.outputs.llms-full-txt-path }} ./build/llms-full.txt
cp ${{ steps.llm-docs.outputs.markdown-zip-path }} ./build/markdown.zip

- name: Upload LLM docs as artifact
uses: actions/upload-artifact@v4
with:
name: llm-docs
path: |
./build/llms.txt
./build/llms-full.txt
./build/markdown.zip
retention-days: 30
Loading