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
21 changes: 21 additions & 0 deletions -scripts/copy-llms-files.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#!/bin/bash

# Copy llms.txt files to site root after Antora build
# This makes them accessible at /docs/llms.txt and /docs/llms-full.txt for AI/LLM discoverability

set -e

BUILD_DIR="${1:-build/site}"

echo "Copying llms.txt files to $BUILD_DIR/..."

find "$BUILD_DIR" -mindepth 2 \( -name "llms.txt" -o -name "llms-full.txt" \) \
-exec cp {} "$BUILD_DIR/" \; \
-print

if [ ! -f "$BUILD_DIR/llms.txt" ] || [ ! -f "$BUILD_DIR/llms-full.txt" ]; then
echo "Error: one or both llms.txt files were not copied to $BUILD_DIR"
exit 1
fi

echo "Done."
3 changes: 3 additions & 0 deletions .github/workflows/deploy_docs_v2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,9 @@ jobs:
- name: Build Website
run: yarn antora ./antora-playbook.yml

- name: Copy llms.txt files to root
run: ./-scripts/copy-llms-files.sh build/site

- name: Rename site folder to docs
run: |
mv ./build/site ./build/docs
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/preview_create.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,9 @@ jobs:
- name: Build Website
run: yarn antora ./antora-playbook.yml

- name: Copy llms.txt files to root
run: ./-scripts/copy-llms-files.sh build/site

- name: Rename site folder to docs
run: |
mv ./build/site ./build/docs
Expand Down
Loading