Git & GitHub Mastery: Workflows & CI/CD
Back to GitHub & Collaboration

GitHub Actions Basics

Run code on every push/PR: tests, lint, deploy. The CI/CD workflow that comes free with your repo. FIND_VIDEO: search 'github actions tutorial CI CD' — recommended channel: GitHub / Fireship. Aim for 11 min or under.

21 minutesVideo LessonPDF notes
🎯 Free Guest Mode: You are learning for free. Sign in to save your completion progress and quiz answers.
Loading progress...

Key moments

  1. CI Pain Points — Continuous Integration solves manual testing and inconsistent environment issues by providing consistent, fast feedback.
  2. Workflow Architecture — Workflows require YAML configuration in the .github/workflows/ path and consist of triggers, runners, and jobs.
  3. Basic CI Syntax — The core YAML structure defines the trigger, the runner OS, and sequential steps using actions and shell commands.
  4. File Location Demo — A live demonstration shows the required .github/workflows/CI.yaml file structure in a repository.
  5. Dependency Caching — Implementing the cache action significantly reduces build time by storing and restoring dependencies based on a key.
  6. Matrix Builds — The strategy: matrix feature enables running the same job simultaneously across multiple environment combinations for compatibility testing.
PDF notes

Frequently asked questions

How does GitHub know where to find my workflow?

GitHub automatically scans the .github/workflows/ directory in the repository root for any YAML files to register as workflows.

What happens if my cache key doesn't match?

If the key doesn't match, the cache is missed, dependencies are downloaded normally, and a new cache entry is saved at the end of the job.

Are GitHub-hosted runners free?

They offer a free minute quota (e.g., 2,000 minutes for public projects); exceeding this limit, especially in private repos, incurs costs.

Why use a matrix build instead of separate jobs?

Matrix builds ensure parallel execution and comprehensive coverage with less YAML duplication than defining separate jobs for every environment combination.

How was this lesson?

Your feedback helps us refine explanations and catch bugs.