Reputation: 119
I have a problem when i deploy application using capistrano. Even if my sitemap.xml
and robots.txt
are written in .gitignore
file, after deploy, that files are destroyed. How to fix this?
Upvotes: 0
Views: 656
Reputation: 2473
As far as I could understand those files are specific to the environment and should persist across deployments.
To address your issue you should store them into shared
directory as explained here.
Then set them up into your deploy config file config/deploy.rb
:
set :linked_files, ["robots.txt", "sitemap.xml"]
Or if you are using capistrano 3.5 or above:
append :linked_files, "robots.txt", "sitemap.xml"
Upvotes: 1