<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/how-to-set-up-a-ci-cd-pipeline-with-husky-and-github-actions-oe4m9f1ke" -->

---
title: How to Set Up a CI/CD Pipeline with Husky and GitHub Actions
description: Learn how to set up a CI/CD pipeline for a Next.js application using Husky and GitHub Actions. This guide covers the basics of continuous integration and...
canonical: https://daily.dev/posts/how-to-set-up-a-ci-cd-pipeline-with-husky-and-github-actions-oe4m9f1ke
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: How to Set Up a CI/CD Pipeline with Husky and GitHub Actions | daily.dev
og:description: Learn how to set up a CI/CD pipeline for a Next.js application using Husky and GitHub Actions. This guide covers the basics of continuous integration and...
og:url: https://daily.dev/posts/how-to-set-up-a-ci-cd-pipeline-with-husky-and-github-actions-oe4m9f1ke
og:image: https://api.daily.dev/og/posts/Oe4m9f1KE.png
og:image:alt: How to Set Up a CI/CD Pipeline with Husky and GitHub Actions
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# How to Set Up a CI/CD Pipeline with Husky and GitHub Actions

**[freeCodeCamp](https://daily.dev/sources/freecodecamp)** · 16 min read · 146 upvotes · 4 comments

## Summary

Learn how to set up a CI/CD pipeline for a Next.js application using Husky and GitHub Actions. This guide covers the basics of continuous integration and delivery, setting up a Next.js app with Vitest, configuring Git hooks with Husky, creating GitHub Actions workflows for automation, and deploying the project using Vercel. Ideal for developers familiar with React, Next.js, and Git.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://www.freecodecamp.org/news/how-to-set-up-a-ci-cd-pipeline-with-husky-and-github-actions/>

## Community discussion

Top comments from developers on daily.dev.

**@eddiejaoude** · 2 upvotes

> Looks great! Automation is so important.
>
> I have a suggestion though, I think it is better not to use `npm install` but `npm ci` instead, because this will make sure you use the exact versions in the package lock file (plus it won't update the lock)

**@rmisulpice** · 0 upvotes

> Awesome article ! Well written 👍

---

Tags: [#webdev](https://daily.dev/tags/webdev), [#cicd](https://daily.dev/tags/cicd), [#nextjs](https://daily.dev/tags/nextjs), [#github-actions](https://daily.dev/tags/github-actions)

[View this post on daily.dev](https://daily.dev/posts/how-to-set-up-a-ci-cd-pipeline-with-husky-and-github-actions-oe4m9f1ke)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"How to Set Up a CI/CD Pipeline with Husky and GitHub Actions","url":"https://daily.dev/posts/how-to-set-up-a-ci-cd-pipeline-with-husky-and-github-actions-oe4m9f1ke","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/how-to-set-up-a-ci-cd-pipeline-with-husky-and-github-actions-oe4m9f1ke"},"datePublished":"2024-07-15T19:16:12.698Z","dateModified":"2024-10-05T17:21:27.950Z","description":"Learn how to set up a CI/CD pipeline for a Next.js application using Husky and GitHub Actions. This guide covers the basics of continuous integration and...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/858a74794f7930aa951329e23f4abdd1?_a=AQAEuiZ","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/858a74794f7930aa951329e23f4abdd1?_a=AQAEuiZ","isAccessibleForFree":true,"articleSection":"freeCodeCamp","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"freeCodeCamp","logo":"https://media.daily.dev/image/upload/t_logo,f_auto/v1628412854/logos/freecodecamp","url":"https://daily.dev/sources/freecodecamp"},"commentCount":4,"discussionUrl":"https://daily.dev/posts/how-to-set-up-a-ci-cd-pipeline-with-husky-and-github-actions-oe4m9f1ke","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":146},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":4}],"keywords":"webdev,cicd,nextjs,github-actions","timeRequired":"PT16M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"freeCodeCamp","item":"https://daily.dev/sources/freecodecamp"},{"@type":"ListItem","position":3,"name":"How to Set Up a CI/CD Pipeline with Husky and GitHub Actions"}]}
{"@context":"https://schema.org","@type":"WebPage","@id":"https://daily.dev/posts/how-to-set-up-a-ci-cd-pipeline-with-husky-and-github-actions-oe4m9f1ke","comment":[{"@type":"Comment","text":"Looks great! Automation is so important.\nI have a suggestion though, I think it is better not to use npm install but npm ci instead, because this will make sure you use the exact versions in the package lock file (plus it won’t update the lock)","datePublished":"2024-07-15T22:18:21.495Z","url":"https://daily.dev/posts/Oe4m9f1KE#c-Mo7k2dqyD","author":{"@type":"Person","name":"Eddie Jaoude","url":"https://daily.dev/eddiejaoude","image":"https://avatars.githubusercontent.com/u/624760?v=4"},"interactionStatistic":{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":2}},{"@type":"Comment","text":"Awesome article ! Well written 👍","datePublished":"2024-09-22T12:19:01.181Z","url":"https://daily.dev/posts/Oe4m9f1KE#c-7Oe7ShGzu","author":{"@type":"Person","name":"Rémi Sulpice","url":"https://daily.dev/rmisulpice","image":"https://avatars.githubusercontent.com/u/85485811?v=4"}}]}
```

