Opinions & Insights
You might not need to build that script anymore
![rube-toilet-paper-machine](/v3/img/blog/rube toliet paper.gif)
I often see individuals tweet about code showing they integrated into a complicated build script just to publish their website.
Got tired of manually deploying things to my website, so I just spent the last hour hooking it up to @travisci to build and deploy it.
— Iheanyi 🇳🇬 Ekechukwu (@kwuchu) January 8, 2017
I applaud the effort in solving the problem of automating deployments for static* sites and actually have more respect for them in doing the hard work of perfecting continuous integration (CI). I just want to point out that this doesn't have to be a problem we solve every week -- git-centric deployment is a solved problem.
— Mark Dalgleish (@markdalgleish) January 18, 2017
At the time of writing this article, Netlify has 150k+ deployed sites, most of which are connected via Git providers. These repos are deploying like clockwork using Netlify's seamless integration to manage deployments. This means you can take your existing build scripts to kick start your CI without the need for hot-wiring code into place. The only requirement is providing your build command to Netlify when connecting your repo. This could be the build command from your static site generator, like
hugo build or the production webpack config wrapped in your
npm run build.
With Netlify, a new build will trigger every time you deploy to your staging, master, or even secret-feature branches. Netlify provides preview sites for each of the branches that you can share via CI and even manage using their deploy context feature.
So next time your friends go off into the corner to start writing the ultimate script that triggers deploys on successful pushes to GitHub, tell them they don't have to anymore—just use Netlify.