Learn how to implement a CI/CD pipeline using GitHub Actions to ensure your code is always in a working state. Implement Husky commit hooks for a clean consistent code base.
Length 18:56
Captions English (Generated), Spanish (Auto-translated), French (Auto-translated), Korean (Auto-translated), Portuguese (Auto-translated), Vietnamese (Auto-translated) #github actions #ci/cd #nodejs #nest.js #husky #automation #devops #coding #web development #testing
0:00 Hey everyone. In today's lecture, I wanna show you how we can use 0:04 GitHub actions inside of a Node.js application in 0:08 order to automatically run a CI/CD pipeline 0:13 against our application. Whenever we push a commit to 0:16 GitHub, or even before that, when we actually open up a new pull 0:20 request, 0:21 we can have a custom CI/CD workflow that 0:24 actually builds our code, lints it, tests it 0:28 to make sure that it is compiling correctly and 0:32 everything is working as expected before we actually merge this code 0:36 into our repository's main branch. 0:39 So by having these checks in place, we can increase our code quality 0:43 dramatically by always ensuring that our application is in a good 0:46 working state and allow for practices like continuous integration 0:51 and continuous delivery. 0:53 I'm also gonna show you how we can use pre-commit hooks to 0:57 run some commands before every commit in a project, like 1:01 cleaning up the code with formatting, to keep our code base clean and 1:04 consistent. So let's jump into this lecture where I'll 1:08 show you how to set 1:08 up both of these. So in this lecture, I'm gonna go ahead and create a 1:12 new Nest.js project. However, this can be inside of 1:16 any Node.js application you want. 1:19 So let's go ahead and use the Nest CLI to create a new 1:22 project. 1:23 If you don't have the Nest CLI, simply install it 1:27 globally at 1:28 nestjs/cli@latest to get it. 1:32 Once you have the CLI, we can run nest new 1:35 and call it whatever we want. I'll call it 1:39 github-actions, 1:42 and I'll go ahead and use the pnpm package manager in this 1:45 example. 1:46 So go ahead and let the 1:48 project finish setting up. 1:51 All of our dependencies are installed. 1:53 We can CD into our folder 1:56 and now open up in a code editor. 2:01 So we have our default Nest.js application here with all of our
The rest of the transcript is for members.
Sign in