CI/CD Pipeline with GitHub Actions
GitHub Actions automates software workflows directly from your repository. This guide walks through setting up a CI/CD pipeline.
GitHub Actions uses YAML-based workflows triggered by events like pushes, pull requests, or scheduled times. Workflows run on GitHub-hosted or self-hosted runners.
Create .github/workflows/ci.yml:
name: CI Pipeline
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Run tests
run: npm testdeploy:
needs: build
runs-on: ubuntu-latest
steps:
- name: Deploy to server
run: |
scp -r dist/ user@server:/var/www/GitHub Actions makes CI/CD accessible and keeps your deployments consistent and automated.
Related Articles
CI/CD Pipeline with GitHub Actions
Step-by-step guide to setting up automated build, test, and deployment pipelines with GitHub Actions.
CCNA Lab 4: Switch Configuration Backup to TFTP Server
Automate Cisco switch configuration backups to a remote TFTP server. Includes scripts, scheduled backups, and disaster recovery procedures.
Bash Scripting for Beginners
Learn the basics of Bash scripting — variables, conditionals, loops, and writing your first automation script.