Skip to content

feat: persist llms.txt across deployments via shared symlink#61

Open
iamimmanuelraj wants to merge 2 commits intomasterfrom
feat/persist-llms-txt
Open

feat: persist llms.txt across deployments via shared symlink#61
iamimmanuelraj wants to merge 2 commits intomasterfrom
feat/persist-llms-txt

Conversation

@iamimmanuelraj
Copy link
Copy Markdown
Member

@iamimmanuelraj iamimmanuelraj commented Apr 29, 2026

Summary

  • Adds llms.txt to the rsync exclude list so it is never deleted by --delete/--delete-excluded during deployments
  • Adds a llms:link task that symlinks shared/llms.txt into each release — but only if the file exists on the server; sites without the file are completely unaffected
  • Uses {{shared_path}} and {{release_path}} Deployer placeholders with quoted paths (handles spaces in deploy paths)
  • Task follows the namespace:action naming convention used throughout the file
  • Uses after('deploy:shared', ...) so it runs as part of the standard Deployer flow

Behaviour

Server state Result
shared/llms.txt exists Symlinked as current/llms.txt pointing to the absolute shared/llms.txt path — persists across all future deploys
shared/llms.txt absent Task runs, finds nothing, skips — deploy passes normally

How to activate for a site (one-time server setup)

For sites that already have llms.txt in their current release, copy it to the shared directory before the next deploy:

SITE=your-site.domain
HTDOCS="/opt/easyengine/sites/$SITE/app/htdocs"
cp "$HTDOCS/current/llms.txt" "$HTDOCS/shared/llms.txt"

On the next deploy the symlink is created automatically. New sites can simply place the file in shared/ whenever ready.

Test plan

  • Deploy to a site that has shared/llms.txt → confirm current/llms.txt is a symlink pointing to the absolute path of shared/llms.txt
  • Deploy to a site without shared/llms.txt → confirm deploy passes with no errors
  • Trigger a second deploy on a site with the file → confirm the file content persists unchanged

Exclude llms.txt from rsync so it is never deleted by --delete, and
add a task that symlinks shared/llms.txt into each release when the
file exists on the server. Sites without the file are unaffected.
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds deployment support to keep an optional llms.txt persistent across releases by excluding it from rsync deletion and symlinking it from the shared directory when present.

Changes:

  • Exclude llms.txt from rsync so it is not deleted during --delete/--delete-excluded.
  • Add a deploy task to symlink shared/llms.txt into each release when the shared file exists.
  • Hook the symlink task into the standard Deployer flow after deploy:shared.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread deploy.php
Comment thread deploy.php Outdated
Comment thread deploy.php Outdated
Comment thread deploy.php Outdated
- Rename task to llms:link to follow namespace:action convention
- Use {{shared_path}} and {{release_path}} Deployer placeholders
  instead of constructing paths manually via get('deploy_path')
- Quote paths in test() and run() to handle spaces in deploy paths
- Removes intermediate PHP variables, now uses placeholders directly
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants