Reputation: 711
jekyll build
is creating a Gemfile and Gemfile.lock in my _site
directory.
Two questions:
Open to any answer, including the yet-not-obvious-to-me.
Thank you!
Here is a screenshot of my environment. You can see that Gemfile and Gemfile.lock are created within _site
.
Upvotes: 3
Views: 718
Reputation: 1316
The best practice is to have only _site
directory placed on production server. If you have the whole Jekyll project placed on production server make sure that _site
directory is marked as root and therefore files on the same or higher level cannot be accessed. In that case presence of Gemfile and Gemfile.lock files does not matter.
I have a Rake task that deploys the Jekyll _site
directory to production server using rsync.
desc "Deploy site"
task :deploy do
command = "jekyll build && \
rsync -avz --delete _site/ myserver:/var/www/mysite/"
sh command
end
This is myserver configuration in .ssh config
Host myserver
User USERNAME
Hostname IP_ADDRESS
PreferredAuthentications publickey
IdentityFile ~/.ssh/myserver/id_rsa
ForwardAgent yes
Upvotes: 1