feat: persist llms.txt across deployments via shared symlink#61
Open
iamimmanuelraj wants to merge 2 commits intomasterfrom
Open
feat: persist llms.txt across deployments via shared symlink#61iamimmanuelraj wants to merge 2 commits intomasterfrom
iamimmanuelraj wants to merge 2 commits intomasterfrom
Conversation
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.
Contributor
There was a problem hiding this comment.
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.txtfrom rsync so it is not deleted during--delete/--delete-excluded. - Add a deploy task to symlink
shared/llms.txtinto 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.
- 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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
llms.txtto the rsync exclude list so it is never deleted by--delete/--delete-excludedduring deploymentsllms:linktask that symlinksshared/llms.txtinto each release — but only if the file exists on the server; sites without the file are completely unaffected{{shared_path}}and{{release_path}}Deployer placeholders with quoted paths (handles spaces in deploy paths)namespace:actionnaming convention used throughout the fileafter('deploy:shared', ...)so it runs as part of the standard Deployer flowBehaviour
shared/llms.txtexistscurrent/llms.txtpointing to the absoluteshared/llms.txtpath — persists across all future deploysshared/llms.txtabsentHow to activate for a site (one-time server setup)
For sites that already have
llms.txtin their current release, copy it to the shared directory before the next deploy:On the next deploy the symlink is created automatically. New sites can simply place the file in
shared/whenever ready.Test plan
shared/llms.txt→ confirmcurrent/llms.txtis a symlink pointing to the absolute path ofshared/llms.txtshared/llms.txt→ confirm deploy passes with no errors