← Back to Projects

My CI/CD pipeline(use to help deploy your own website)

Practical, secure, production-ready steps to build websites to Netlify or Vercel with easy code automation.

Overview

Goal: Use my guideline to create your very first CI/CD pipeline to deploy code to Netlify or Vercel.

Prerequisites

Step 1

Grab your folder path of HTML files folder.

Description of the image

  • After linking your bitbucket or github account to your VS Code editor got to bottom and click terminal and paste your folder path and then hit Enter
  • Description of the image

    Step 2

    In the terminal initialize your very first git repo command. Type gitinit and then hit Enter

    Description of the image
    Step 3

    Type git add . (This adds files from your folder containing your HTML files to your repo)

    Description of the image
    Step 4

    Now this is where things get a bit tricky feel free to email me any questions.

    My branch name is "test" for running a test deployment environment. GitBash automatically puts you in master branch. We need to switch to test branch so run this exact command.

    Description of the image

    To make sure you are on test branch Run git branch command in terminal and you should see *test highlighted in green

    Description of the image

    Step 5

    Now time to Commit your code to the repository

    • First Run "git commit -m "New" " (What this does is commits your code to your bitbucket/github repo and then you can link your repo to your Netlify account to deploy.
    • Description of the image

      Step 6

      Now remote add your origin this step I completed from Bitbucket but github is similar process.

      Grab your bitbucket URL from your web browser address bar

      Description of the image

      Next go back to your VS Code terminal and run this command pasting your exact URL address after "remote add origin" (This process links your repo to your git terminal for future code changes)

      Description of the image

      Step 7

      Time to pull and push your code creating your very first CI/CD pipeline to your Bitbucket/Github repo

        Run a pull command to pull repo with this line of code (Note: "test" is the name of your branch in the future you can name your branch whatever you want with git switch -c newname)

        Description of the image

        Run a push command to push your repo code with this line of code (Note: test is the name of your branch)

        Description of the image

        CONGRATULATIONS! YOU HAVE SETUP YOUR VERY FIRST CI/CD PIPELINE YOU CAN NOW LINK THIS WHEREVER YOU WANT WHETHER IT IS NETLIFY/VERCEL OR EVEN SELF HOST ON YOUR OWN WEB SERVER. Please feel free to email me if you are stuck on a step. Thank you!