Jekyll
Can I deploy Jekyll to my Hatchbox server?
Of course! While we don't provide official support for this, it's really easy.
Add a deploy script to your Jekyll repo.
Create an NGINX server config for your Jekyll site.
Run the deploy script anytime you want to deploy your site.
1. Add the deploy script to your repo
Paste the following into your Jekyll repo and commit it to git.
Change the IP_ADDRESS
to the IP address of your server and change example.com
to the domain of your app. This will create a folder called example.com
where your Jekyll site will live on the server. Using the domain will make it easy to find
2. Create your NGINX config
You can paste the following config into /etc/nginx/sites-enabled/jekyll
to setup NGINX. Make sure to change your server_name
and root
folder to match the domain and folder you want to deploy to.
After you've created this file, run sudo service nginx reload
to restart NGINX.
3. Run the deploy script to deploy
Anytime you want to deploy, cd into your Jekyll app, and run ./deploy.sh
which will trigger a jekyll build
and rsync all the files up to the server.
Last updated