Master GitHub CI CD Pipeline Example: Ultimate Guide

Logan Jul 13, 2026

Streamlining software development workflows is a core objective of modern DevOps practices, and a GitHub Actions CI/CD pipeline is a powerful tool in achieving just that. This instructor-led guide will delve into the process of creating a GitHub CI/CD pipeline, exemplified by a simple Node.js application. Let's demystify this automation process, step by step.

DevOps CI/CD Explained: Build, Test, Deploy & Monitor
DevOps CI/CD Explained: Build, Test, Deploy & Monitor

The initial step in setting up a CI/CD pipeline on GitHub is creating a workflow file. In the root directory of your repository, under the '.github/workflows' folder, create a YAML file, say 'ci.yml'.

an image of a web page with the title cl / cd getting started steal my github actions workflow
an image of a web page with the title cl / cd getting started steal my github actions workflow

Creating a Workflow File

The YAML file, which defines your workflow, should begin with the 'name' property, followed by 'on' to specify when the workflow should run. For instance, on every push or pull request, as illustrated below:

the ci / cd pipeline explaining how it works
the ci / cd pipeline explaining how it works

```yaml name: CI/CD Pipeline on: [push, pull_request] ```

Workflow Jobs

The 'jobs' key refers to the tasks that will be run sequentially or concurrently. Each job contains the 'steps' that are executed one at a time. Let's see how to create a 'build' job:

#gitops #cicd #kubernetes #devops #cloudnative #argocd #fluxcd #gitlab #infrastructureascode #sre #microservices | Ignacio C.
#gitops #cicd #kubernetes #devops #cloudnative #argocd #fluxcd #gitlab #infrastructureascode #sre #microservices | Ignacio C.

```yaml jobs: build: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - uses: actions/setup-node@v2 with: node-version: '14' - run: npm install - run: npm run build ```

Additional Jobs

You can add more jobs, like 'test' and 'deploy' to a production environment. Here's an example:

```yaml - job: test runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - uses: actions/setup-node@v2 with: node-version: '14' - run: npm install - run: npm run test - job: deploy runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - uses: actions/setup-node@v2 with: node-version: '14' - run: npm install - uses: peaceiris/actions-gh-pages@v3 with: github_token: ${{ secrets.GITHUB_TOKEN }} publish_dir: ./build ```

Secrets Management

CI/CD Pipelines Tools
CI/CD Pipelines Tools

The '${{ secrets.GITHUB_TOKEN }}' used in the 'deploy' job above is an environment variable that accesses secrets, i.e., sensitive information like API keys or passwords. Secrets can be managed through 'secrets' in your repository settings.

For non-GitHub secrets, you can use GitHub Actions Secrets, or third-party secret management tools like HashiCorp's Vault, or Azure Key Vault.

Accessing Secrets

GitHub Action (CI/CD Pipeline)
GitHub Action (CI/CD Pipeline)

Accessing secrets within your workflows requires prefixing the secret's name with '${{ secrets }}' like in the 'deploy' job:

```yaml - uses: peaceiris/actions-gh-pages@v3 with: github_token: ${{ secrets.GITHUB_TOKEN }} publish_dir: ./build ```

Storing Secrets

How GitHub Actions can improve CI/CD and compares with Azure Pipelines
How GitHub Actions can improve CI/CD and compares with Azure Pipelines
🔄 Automate Everything: CI/CD with GitHub Actions

Manual deployments are a thing of the past. 🛠️ In the world of high-level cloud engineering, automation is the standard. Learn how to build robust CI/CD pipelines using GitHub Actions to streamline your workflow and eliminate human error. At CloudElite, we don't just talk about it, we give you the hands-on experience to master it. 🔄
#GitHubActions #CICD #Automation #CloudElite #DevOps #TechSkills #CloudEngineering
🔗 Streamline your workflow:
🔄 Automate Everything: CI/CD with GitHub Actions Manual deployments are a thing of the past. 🛠️ In the world of high-level cloud engineering, automation is the standard. Learn how to build robust CI/CD pipelines using GitHub Actions to streamline your workflow and eliminate human error. At CloudElite, we don't just talk about it, we give you the hands-on experience to master it. 🔄 #GitHubActions #CICD #Automation #CloudElite #DevOps #TechSkills #CloudEngineering 🔗 Streamline your workflow:
Software Architecture Design, Software Development Pipeline Diagram, Computer Coding, Data Science Learning, Computer Science Programming, Learning Websites, Software Architecture Diagram, Computer Science Lessons, Digital Transformation
Software Architecture Design, Software Development Pipeline Diagram, Computer Coding, Data Science Learning, Computer Science Programming, Learning Websites, Software Architecture Diagram, Computer Science Lessons, Digital Transformation
The Ultimate CI/CD Pipeline Sketch 🚀⚙️
The Ultimate CI/CD Pipeline Sketch 🚀⚙️
#devops #kubernetes #cicd #automation #cloudnative #continuousdelivery #microservices | Nour Ben Abderrahmen
#devops #kubernetes #cicd #automation #cloudnative #continuousdelivery #microservices | Nour Ben Abderrahmen
A Beginners Guide to CI/CD with GitHub Actions
A Beginners Guide to CI/CD with GitHub Actions
CI/CD
CI/CD
Optimize GitHub Actions Performance: Boost Your CI/CD Workflows 🚀⚡
Optimize GitHub Actions Performance: Boost Your CI/CD Workflows 🚀⚡
The Ultimate CI/CD Pipeline Sketch 🚀⚙️
The Ultimate CI/CD Pipeline Sketch 🚀⚙️
Dérouler rigoureusement le pochade Github à cause l'accueil partagé cPanel pile les labeurs Githu...
Dérouler rigoureusement le pochade Github à cause l'accueil partagé cPanel pile les labeurs Githu...
Automate Development: CI/CD with GitHub & Docker ⚙️🚀
Automate Development: CI/CD with GitHub & Docker ⚙️🚀
⚙️ CI/CD Pipeline. Automate Your Deployments
🚀 From code commit to production! 💡 Learn how CI/CD pipelines automate testing, integration, and deployment for faster, safer releases. ⚡ Build once, deploy continuously!

#machinelearning #itprofessionals #skillsdevelopment #techinnovation #professionalgrowth #careerchange #learner #computerscience #traininganddevelopment #educationtechnology #digitization #techlife #techforgood #learnsomethingnew #computerengineering#CICD#CloudElite
⚙️ CI/CD Pipeline. Automate Your Deployments 🚀 From code commit to production! 💡 Learn how CI/CD pipelines automate testing, integration, and deployment for faster, safer releases. ⚡ Build once, deploy continuously! #machinelearning #itprofessionals #skillsdevelopment #techinnovation #professionalgrowth #careerchange #learner #computerscience #traininganddevelopment #educationtechnology #digitization #techlife #techforgood #learnsomethingnew #computerengineering#CICD#CloudElite
GITHUB PROJECTS THAT CAN GET YOU HIRED
GITHUB PROJECTS THAT CAN GET YOU HIRED
Beginner's Guide to CI/CD Pipeline From Scratch
Beginner's Guide to CI/CD Pipeline From Scratch
Automating DevOps Pipeline with CI/CD Tools
Automating DevOps Pipeline with CI/CD Tools
Knowledge 21052024
Knowledge 21052024
Unveiled Secret! Elite Python, Java, JS Expertise: Stop Searching, Start Shining – Assured Mastery!
Unveiled Secret! Elite Python, Java, JS Expertise: Stop Searching, Start Shining – Assured Mastery!
Git & GitHub Roadmap for Beginners
Git & GitHub Roadmap for Beginners
an info sheet describing the various types of pipelines in which people can use them
an info sheet describing the various types of pipelines in which people can use them
A beginner’s guide to CI/CD and automation on GitHub
A beginner’s guide to CI/CD and automation on GitHub

The secrets are stored in the repository settings' 'secrets' tab, where you can add new secrets and view the existing ones. Be sure not to leak them anywhere, as they are sensitive information.

Implementing a GitHub CI/CD pipeline can certainly seem daunting initially, but with right planning and the right tools like GitHub Actions, it can be a breeze. This also helps your development process become more predictable, efficient, and ultimately, enjoyable. Happy coding!