Deploy your Jekyll website to a Laravel Forge managed server

Published on November 13th, 2016
[Jekyll](https://jekyllrb.com/) is a fantastic system for static file based websites. Over the past few years, the number of the sites powered by the tool has skyrocketed due to [Github](https://github.com) offering free hosting via [Github Pages](https://pages.github.com/). I had been using Github Pages to host this site until a few weeks ago when I transferred the site to a new [Linode](https://www.linode.com/?r=9e1d35a95e0107df39a9edb1d05946f7d8649a41) powered server. I was in the process of launching [ZoneWatcher](https://zonewatcher.com/) and wanted more control over my domain. Mostly, I wanted to power the SSL/TLS with LetsEncrypt instead of using the shared CloudFlare certificate. ### Installing Jekyll on the Server The first step is to install Jekyll on the server you want to host it. That can be done through a few easy steps. In these command I'll assume you're using Ubuntu 16.04. **Update APT** Do yourself a favor and update your packages to avoid pulling down an old version of the pagages we are about to install. ```sh apt update apt upgrade ``` **Install Ruby** ```sh apt install ruby ruby-dev ``` **Install Jekyll's CLI** ```sh gem install jekyll bundler ``` ### Configuring Forge Now that we are all set with installing packages, we can proceed to configure Forge to serve & auto-deploy our Jekyll based site. **Step 1:** Provision your site & select your jekyll repository you'd like to serve **Step 2:** Set your public Web Directory to __/_site__ ![set your web directory](https://tomschlick-screenshots.s3.amazonaws.com/9r2Y2Ftr) **Step 3:** Modify your deployment script to include ```jekyll build``` ![modify deployment script](https://tomschlick-screenshots.s3.amazonaws.com/mLBllxqf) **Step 4:** Enable quick deploys to auto-publish your site after each change is made (optional). This can be done with the toggle on the Forge interface. ### You're Done! Manually trigger a deployment and your site should now be live!