# You should CD your blog (Firebase Hosting + Circle CI + Docker)

DevFeed: [You should CD your blog (Firebase Hosting + Circle CI + Docker)](<https://devfeed.tech/articles/you-should-cd-your-blog-firebase-hosting-circle-ci-docker-25360.md>)

Original publisher: [Read original article](<https://kau.sh/blog/you-should-cd-your-blog-with-jekyll-docker-circle-ci/>)

Author: Kaushik Gopal

Published: 2020-01-29T07:00:00Z

Content type: tutorial

Language: en

Sources: [Kaushik Gopal's Site](<https://devfeed.tech/sources/kaushik-gopal-s-site.md>)

Topics: [Jekyll](<https://devfeed.tech/topics/jekyll.md>), [CI/CD](<https://devfeed.tech/topics/cicd.md>), [Firebase](<https://devfeed.tech/topics/firebase.md>), [Docker](<https://devfeed.tech/topics/docker.md>), [GitHub](<https://devfeed.tech/topics/github.md>)

Tags: [blog](<https://devfeed.tech/tags/blog.md>), [code](<https://devfeed.tech/tags/code.md>), [commands](<https://devfeed.tech/tags/commands.md>), [continuous-delivery](<https://devfeed.tech/tags/continuous-delivery.md>), [docker](<https://devfeed.tech/tags/docker.md>), [firebase](<https://devfeed.tech/tags/firebase.md>), [git](<https://devfeed.tech/tags/git.md>), [github](<https://devfeed.tech/tags/github.md>), [hosting](<https://devfeed.tech/tags/hosting.md>), [jekyll](<https://devfeed.tech/tags/jekyll.md>)

## AI overview

A developer describes automating deployment of a Jekyll blog hosted on Firebase using CircleCI. The workflow builds the site, checks generated HTML, and deploys it after changes are pushed to GitHub; failures trigger an email notification.

## Source excerpt

This blog now 1 uses Jekyll - a static blog generator that takes markdown as an input and pumps html as output. I then copy it over to my hosting server - Firebase, which then happily serves it to the interwebs. This setup has worked out swimmingly well thus far and has been rock solid. Even when my last post got high up the ranks of HN, my blog held steady. Not even the slightest of fears or signs of being fireballed or slashdotted. This is the beauty of HTML. To achieve the above, these are the actual steps: write my blog post in markdown git commit and push blog post to git(hub) (this entire blog is version controlled) run command "bundle exec jekyll build" (use jekyll to generate the html) run command "bundle exec htmlproofer ./site -check-favicon -check-html" (on generated html from step 3 to make sure I don't have broken links etc.) run command "firebase deploy -only hosting" That's 3 steps more than my lazy self is willing to do every single time. In software land, we've solved this problem with CD (Continuous Delivery). You have a server somewhere on the internet, that keeps checking your github repo every time you've made a change, then runs a sequence of commands for you. That's exactly what I did for this blog. I now use Circle CI 2 to ping github and run through steps 3-5. If all's well my blog is updated with my new post. If something didn't go well, I get an email notifying me about it which I can then promptly fix. Even when I'm just tweaking the appearance of this blog, I tend to make a lot of changes 3 to my css (it's like my happy place). Setting up CD has saved me huge amounts of time! If you're a developer, or savvy enough to dabble with some code, I highly recommend it! Here's what my circle ci config looks like: version: 2 jobs: build: working_directory: ~/repo # docker hub images https://hub.docker.com/ docker: - image: kaushikgopal/ruby-node:2.6.5_12.14.0 steps: - checkout # Download and cache dependencies - restore_cache: keys: # Find a cach