Deploy your Jekyll website to a Laravel Forge managed server

November 13, 2016

[Jekyll]( 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]( offering free hosting via [Github Pages]( I had been using Github Pages to host this site until a few weeks ago when I transferred the site to a new [Linode]( powered server. I was in the process of launching [ZoneWatcher]( 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](

**Step 3:** Modify your deployment script to include ```jekyll build``` ![modify deployment script](

**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!