My last adventure was migrating my crufty Jekyll site to Gatsby. I used to deploy my Jekyll site manually by building it locally and pushing the generated static content to the gh-pages branch on GitHub. With my new site in place, I decided it was time to leave my old ways behind and set up an automated pipeline to deploy my site to GitHub pages.
My last adventure was migrating my crufty Jekyll site to Gatsby. I used to deploy my Jekyll site manually by building it locally and pushing the generated static content to the gh-pages
branch on GitHub. With my new site in place, I decided it was time to leave my old ways behind and set up an automated pipeline to deploy my site to GitHub pages.
I’ve always used GitHub Pages to host my blog because it’s lightweight and integrates seamlessly with GitHub. It is simple, free, and provides free goodies like enforcing HTTPS by default and also supports adding a custom domain.
Before automating the deployment of my new Gatsby site, I learned how to deploy it locally. To do this, I added an entry to the scripts
tag in package.json
which creates a production-ready build for my Gatsby site.
"scripts": {
...
"build": "gatsby build"
}
npm run build
builds the site and places the generated assets in a folder called public
. Copying this public
folder to any HTTP server would deploy my site to that server.
I started an HTTP server using http-server to serve the assets in the public
folder which effectively deployed my site locally.
➜ cd public
➜ http-server
Starting up http-server, serving ./
Available on:
http://127.0.0.1:8082
http://10.10.10.10:8082
DevOps is supposed to help streamline the process of taking code changes and getting them to production for users to enjoy. But what exactly does it mean for the process to be "streamlined"? One way to answer this is to start measuring metrics.
🔥Edureka DevOps Training: https://www.edureka.co/devops-certification-training This Edureka video on Continuous Integration explains the concept of Continuou
So lets chat DevOps, CI/CD and software lifecycles. In this tutorial I attempt to explain DevOps and CI/CD, Continuous Integration and Continuous Delivery / Continuous Deployment. I touch on the many definitions of DevOps, I try and differentiate between DevOps and CI/CD and give you an insight into the idea of a pipeline for develop and deployment automation.
The ultimate showdown between Travis CI vs Jenkins. Check out this guide to know who wins the race! Travis CI and Jenkins are both popular CI/CD tools and were launched in the same year i.e. 2011. As of July 2020, Jenkins has been the more obvious choice as CI/CD tool with 15.9k stars & 6.3k forks, in comparison to TravisCI which has 8k stars & 756 forks. However, these numbers alone don’t imply which CI/CD tool is more suitable for your upcoming or existing project. Jenkins is an open-source & Travis CI is free for open-source projects.
After setting up CI with Travis-CI for a Github repository when you push your code to the repository, Travis CI clones it to build and tests your code. If one or more of those tasks fail, the build is considered broken. If none of the tasks fails, the build is considered passed. A new VM is used for every build. In this tutorial, you'll see Setting up Continuous Integration(CI) for Node app with Travis-CI