BeCuriouzLearn something new every day
GitHub Actions: your repo reacts to events
💡 GitHub Actions runs your YAML workflows on fresh, throwaway VMs triggered by repo events — so state only survives if you explicitly cache or upload it.
GitHub Actions is GitHub's built-in automation platform. You commit a YAML file to .github/workflows/, and GitHub runs it automatically whenever something happens in your repo — a push, a pull request, a new issue, or a scheduled time. The core problem it solves is continuous integration and deployment (CI/CD): automatically building, testing, and shipping your code so you don't run those steps by hand on your laptop.
The mental model is a chain of nouns. An event (like a push) triggers a workflow, which contains one or more jobs, each made of steps. Each job runs on a runner — a fresh virtual machine GitHub spins up just for that job.
The non-obvious part: each runner is ephemeral — a clean machine that is destroyed when the job ends. Nothing carries over between jobs unless you explicitly persist it via artifacts or caching. That's why Actions favors reusable, published building blocks from the Marketplace (like actions/checkout) instead of hand-rolled scripts — and it's why forgetting to cache dependencies makes every run slow.