Gatsby Tutorial #22 - Continuous Deployment

Net Ninja · Beginner ·🌐 Frontend Engineering ·5y ago

Key Takeaways

This video tutorial demonstrates how to set up continuous deployment in Netlify for a Gatsby website, using GitHub as the repository and Netlify's automatic deployment feature.

Full Transcript

so another way that we can deploy our website using netlify is to set up something called continuous deployment and this is where we upload all of our project code to a github repo and then we can hook up our netlify account with that github repo so that it automatically deploys the main branch in that repo and then in the future if we ever make changes to our website we push those changes up to our github repository we merge those changes to the main branch netlify is automatically going to pick up on that change and it's going to rebuild our application and redeploy it so we don't have to manually do it every time we update the website so that's pretty nice so i'm going to demo this by creating a new repository which i'm going to call web warrior website like so now this can be public or private really doesn't matter i'm going to create this repository and then once we've done that we need to push up our code from this project to that repo so to do this i'm going to copy first of all these first two lines of code i don't want to push it right away so i'm going to paste those in to add the origin and to use the main branch and then what i'm going to do is add all of the changes we've made to this project so to do that i'm going to say git add and by the way if you want to learn more about git and github i've got a complete playlist on this very channel the link to that is going to be down below so git add and then i'm going to say git commit m and we'll just say site for the commit message really doesn't matter and then i'm going to push that up so git push origin main like so so we're pushing up that main branch and now hopefully if we come over here and refresh we should see if we do it again no we don't is it done yet okay it's still uploading so let's just give this a second all right cool looks like it's done so now if i refresh we should see that project right here okay cool let me just go into the source and make sure we have all of the pages yep looks about right all right so how do we then hook this up with netlify well pretty simple all we do is say we want to make a new site from git so this is for continuous deployment like we've said we're going to use github so it's going to authorize you right here and then you need to search for your repo now i want to search for web warrior website like so press enter and this is the repo i want to use so the main branch is the one we're going to deploy we don't need to change anything else we can just click on deploy site and netlify is going to hook up with that repo and try to deploy the main branch for us all right and then once that's done we can just click on this url and we should be able to see the website which we can and by the look of things everything is working awesome all right then so what if we wanted to make a change to the website well all we need to do is first of all we could come down here to our local project and we could check out a new branch so i could say git check out a new branch and we'll just call this home page to make changes to the home page all right so if i open up now the source folder and go into the pages then go into index which is the home page i'm just going to add a lot of exclamation marks to that so a simple change but just to demonstrate the process so now what i'm going to do is add all those changes that single change i'm going to commit that and i'm going to say home page text for the commit message and then i'm going to push it so get push origin and the branch was called home page so we're just pushing up a new branch here to our repo and then once we've done that we can go over to the repo right here we can see home page had recent pushes so let's compare and make a pull request um yep i'm going to make a pull request for this so we can merge it into the main branch so we'll merge that into the main branch but before we do that you can see there are some checks in progress and that's coming from netlify so it's just doing these checks first of all before we merge this into the main branch and then once those checks have passed we can merge this so let's merge it and confirm the merge right there and then once this is done we can then come over to our site overview over here you can scroll down here and see now we have a new build going on so once this is complete it will publish it for us and we should be able to see that update over here when we click on this address all right so now that's done we can scroll back up i'm going to click on this and we can see that update right here so my friends that is how we set up continuous deployment with netlify and that is also the end of this series so i really hope you enjoyed it and i will be doing more advanced series on gatsby in the future maybe with some kind of headless cms could be wordpress or maybe something like contentful we'll see but more advanced tutorials are coming in the future if you enjoyed the videos my friends please do not forget to share subscribe and like and i'm going to see you in the very next series

Original Description

Hey gang, in this final Gatsby tutorial I'll show you how to set up continuous deployment in Netlify. 🐱‍💻 🐱‍💻 Course Files: + https://github.com/iamshaunjp/gatsby-tutorial 🐱‍👤🐱‍👤 JOIN THE GANG - https://www.youtube.com/channel/UCW5YeuERMmlnqo4oq8vwUpg/join 🐱‍💻 🐱‍💻 My Udemy Courses: + Modern JavaScript - https://www.thenetninja.co.uk/udemy/modern-javascript + Vue JS 3 & Firebase - https://www.thenetninja.co.uk/udemy/vue-and-firebase + D3.js & Firebase - https://www.thenetninja.co.uk/udemy/d3-and-firebase 🐱‍💻 🐱‍💻 Useful playlists: + Full React tutorial - https://www.youtube.com/watch?v=j942wKiXFu8&list=PL4cUxeGkcC9gZD-Tvwfod2gaISzfRiP9d + GraphQL tutorial - https://www.youtube.com/watch?v=Y0lDGjwRYKw&list=PL4cUxeGkcC9iK6Qhn-QLcXCXPQUov1U7f 🐱‍💻 🐱‍💻 Other links: + Gatsby docs - https://www.gatsbyjs.com/docs/ + Markdown guide - https://guides.github.com/features/mastering-markdown/ + Download Git - https://git-scm.com/downloads + Get VS Code - https://code.visualstudio.com/ 🐱‍💻 🐱‍💻 Social Links: Facebook - https://www.facebook.com/thenetninjauk Twitter - https://twitter.com/thenetninjauk Instagram - https://www.instagram.com/thenetninja/
Sign in to unlock AI tutor explanation · ⚡30

Playlist

Uploads from Net Ninja · Net Ninja · 0 of 60

← Previous Next →
1 Regular Expressions (RegEx) Tutorial #14 - Matching a Username
Regular Expressions (RegEx) Tutorial #14 - Matching a Username
Net Ninja
2 Regular Expressions (RegEx) Tutorial #15 - Email RegEx Pattern
Regular Expressions (RegEx) Tutorial #15 - Email RegEx Pattern
Net Ninja
3 Regular Expressions (RegEx) Tutorial #16 - Finishing Touches
Regular Expressions (RegEx) Tutorial #16 - Finishing Touches
Net Ninja
4 GraphQL Tutorial #1 - Introduction to GraphQL
GraphQL Tutorial #1 - Introduction to GraphQL
Net Ninja
5 GraphQL Tutorial #2 - A Birdseye View of GraphQL
GraphQL Tutorial #2 - A Birdseye View of GraphQL
Net Ninja
6 GraphQL Tutorial #3 - Project (stack) Overview
GraphQL Tutorial #3 - Project (stack) Overview
Net Ninja
7 GraphQL Tutorial #4 - Making Queries (front-end preview)
GraphQL Tutorial #4 - Making Queries (front-end preview)
Net Ninja
8 GraphQL Tutorial #5 - Express App Setup
GraphQL Tutorial #5 - Express App Setup
Net Ninja
9 GraphQL Tutorial #6 - Setting up GraphQL
GraphQL Tutorial #6 - Setting up GraphQL
Net Ninja
10 GraphQL Tutorial #7 - GraphQL Schema
GraphQL Tutorial #7 - GraphQL Schema
Net Ninja
11 GraphQL Tutorial #8 - Root Query
GraphQL Tutorial #8 - Root Query
Net Ninja
12 GraphQL Tutorial #9 - The Resolve Function
GraphQL Tutorial #9 - The Resolve Function
Net Ninja
13 GraphQL Tutorial #10 - Testing Queries in Graphiql
GraphQL Tutorial #10 - Testing Queries in Graphiql
Net Ninja
14 GraphQL Tutorial #11 - GraphQL ID Type
GraphQL Tutorial #11 - GraphQL ID Type
Net Ninja
15 GraphQL Tutorial #12 - Author Type
GraphQL Tutorial #12 - Author Type
Net Ninja
16 GraphQL Tutorial #13 - Type Relations
GraphQL Tutorial #13 - Type Relations
Net Ninja
17 GraphQL Tutorial #14 - GraphQL Lists
GraphQL Tutorial #14 - GraphQL Lists
Net Ninja
18 GraphQL Tutorial #15 - More on Root Queries
GraphQL Tutorial #15 - More on Root Queries
Net Ninja
19 GraphQL Tutorial #16 - Connecting to mLab
GraphQL Tutorial #16 - Connecting to mLab
Net Ninja
20 GraphQL Tutorial #17 - Mongoose Models
GraphQL Tutorial #17 - Mongoose Models
Net Ninja
21 GraphQL Tutorial #18 - Mutations
GraphQL Tutorial #18 - Mutations
Net Ninja
22 GraphQL Tutorial #19 - More on Mutations
GraphQL Tutorial #19 - More on Mutations
Net Ninja
23 GraphQL Tutorial #20 - Updating the Resolve Functions
GraphQL Tutorial #20 - Updating the Resolve Functions
Net Ninja
24 GraphQL Tutorial #21 - GraphQL NonNull
GraphQL Tutorial #21 - GraphQL NonNull
Net Ninja
25 GraphQL Tutorial #22 - Adding a Front-end
GraphQL Tutorial #22 - Adding a Front-end
Net Ninja
26 GraphQL Tutorial #23 - Create React App
GraphQL Tutorial #23 - Create React App
Net Ninja
27 GraphQL Tutorial #24 - Book List Component
GraphQL Tutorial #24 - Book List Component
Net Ninja
28 GraphQL Tutorial #25 - Apollo Client Setup
GraphQL Tutorial #25 - Apollo Client Setup
Net Ninja
29 GraphQL Tutorial #26 - Making Queries from React
GraphQL Tutorial #26 - Making Queries from React
Net Ninja
30 GraphQL Tutorial #27 - Rendering Data in a Component
GraphQL Tutorial #27 - Rendering Data in a Component
Net Ninja
31 GraphQL Tutorial #28 - Add Book Component
GraphQL Tutorial #28 - Add Book Component
Net Ninja
32 GraphQL Tutorial #29 - External Query File
GraphQL Tutorial #29 - External Query File
Net Ninja
33 GraphQL Tutorial #30 - Updating Component State
GraphQL Tutorial #30 - Updating Component State
Net Ninja
34 GraphQL Tutorial #31 - Composing Queries
GraphQL Tutorial #31 - Composing Queries
Net Ninja
35 GraphQL Tutorial #32 - query variables
GraphQL Tutorial #32 - query variables
Net Ninja
36 GraphQL Tutorial #33 - Re-fetching Queries
GraphQL Tutorial #33 - Re-fetching Queries
Net Ninja
37 GraphQL Tutorial #34 - Book Details Component
GraphQL Tutorial #34 - Book Details Component
Net Ninja
38 GraphQL Tutorial #36 - Styling the App
GraphQL Tutorial #36 - Styling the App
Net Ninja
39 GraphQL Tutorial #35 - Making a Single Query
GraphQL Tutorial #35 - Making a Single Query
Net Ninja
40 Build Apps with Vue & Firebase - Udemy Course
Build Apps with Vue & Firebase - Udemy Course
Net Ninja
41 Updated Vue & Firebase Course (Udemy)
Updated Vue & Firebase Course (Udemy)
Net Ninja
42 Vue & Firebase Real-time Chat (Preview) #1 - Intro
Vue & Firebase Real-time Chat (Preview) #1 - Intro
Net Ninja
43 Vue & Firebase Real-time Chat (Preview) #2 - Project Structure
Vue & Firebase Real-time Chat (Preview) #2 - Project Structure
Net Ninja
44 Vue & Firebase Real-time Chat (Preview) #3 - Firestore Setup
Vue & Firebase Real-time Chat (Preview) #3 - Firestore Setup
Net Ninja
45 Vue & Firebase Real-time Chat (Preview) #4 - Welcome Screen
Vue & Firebase Real-time Chat (Preview) #4 - Welcome Screen
Net Ninja
46 Vue & Firebase Real-time Chat (Preview) #5 - Props in Routes
Vue & Firebase Real-time Chat (Preview) #5 - Props in Routes
Net Ninja
47 Vue & Firebase Real-time Chat (Preview) #6 - Route Guards
Vue & Firebase Real-time Chat (Preview) #6 - Route Guards
Net Ninja
48 Vue & Firebase Real-time Chat (Preview) #7 - Chat Window
Vue & Firebase Real-time Chat (Preview) #7 - Chat Window
Net Ninja
49 Vue & Firebase Real-time Chat (Preview) #8 - New Message Component
Vue & Firebase Real-time Chat (Preview) #8 - New Message Component
Net Ninja
50 Object Oriented JavaScript Tutorial #1 - Introduction
Object Oriented JavaScript Tutorial #1 - Introduction
Net Ninja
51 Object Oriented JavaScript Tutorial #2 - Object Literals
Object Oriented JavaScript Tutorial #2 - Object Literals
Net Ninja
52 Object Oriented JavaScript Tutorial #3 - Updating Properties
Object Oriented JavaScript Tutorial #3 - Updating Properties
Net Ninja
53 Object Oriented JavaScript Tutorial #4 - Classes
Object Oriented JavaScript Tutorial #4 - Classes
Net Ninja
54 Object Oriented JavaScript Tutorial #5  - Class Constructors
Object Oriented JavaScript Tutorial #5 - Class Constructors
Net Ninja
55 Object Oriented JavaScript Tutorial #6 - Class Methods
Object Oriented JavaScript Tutorial #6 - Class Methods
Net Ninja
56 Object Oriented JavaScript Tutorial #7 - Method Chaining
Object Oriented JavaScript Tutorial #7 - Method Chaining
Net Ninja
57 Object Oriented JavaScript Tutorial #8 - Class Inheritance
Object Oriented JavaScript Tutorial #8 - Class Inheritance
Net Ninja
58 Object Oriented JavaScript Tutorial #9 - Constructors (under the hood)
Object Oriented JavaScript Tutorial #9 - Constructors (under the hood)
Net Ninja
59 Object Oriented JavaScript Tutorial #10 - Prototype
Object Oriented JavaScript Tutorial #10 - Prototype
Net Ninja
60 Object Oriented JavaScript Tutorial #11 - Prototype Inheritance
Object Oriented JavaScript Tutorial #11 - Prototype Inheritance
Net Ninja

This video teaches how to set up continuous deployment for a Gatsby website using Netlify and GitHub, allowing for automatic deployment of changes to the main branch.

Key Takeaways
  1. Create a new GitHub repository
  2. Push the Gatsby project code to the repository
  3. Set up a new site in Netlify from the GitHub repository
  4. Configure Netlify to deploy the main branch automatically
  5. Make changes to the website and push them to a new branch
  6. Create a pull request to merge the changes into the main branch
  7. Verify that Netlify automatically deploys the updated website
💡 Continuous deployment allows for automatic deployment of changes to a website, streamlining the development and deployment process.

Related Reads

📰
Mechanics of Virtualization in the Frontend
Learn how to optimize frontend performance by virtualizing large lists, reducing the number of DOM elements and improving scrollability
Medium · JavaScript
📰
When Software Transformed My Frontend Thinking
Discover how software transformed one developer's frontend thinking, shifting focus from aesthetics to functionality and user experience
Medium · Programming
📰
Here is how you can add your desired Google Fonts to your own React project.
Add Google Fonts to your React project with these easy steps
Medium · Programming
📰
I Was Asked to Design a File Uploader in a Frontend System Design Interview (SDE 2) | Part 1
Learn to design a file uploader in a frontend system, a crucial skill for frontend engineers, and improve your system design interview skills
Medium · JavaScript
Up next
Sports on the Go: Africa makes history at 2026 FIFA World Cup
CGTN Africa
Watch →