What is GitHub Actions?
GitHub Actions is GitHub's built-in automation. A workflow, written in a YAML file under .github/workflows, runs jobs on GitHub-hosted machines when events like a push or pull request occur, commonly for tests, builds and deployment.
Explain it simply
Imagine a helper who, every time you hand in code, runs the tests, checks the formatting and tells you if anything fails, without you asking.
A workflow file names the trigger (on: push), the machine (runs-on: ubuntu-latest) and steps. Steps can run shell commands or reuse ready-made actions such as actions/checkout. Results show as green ticks or red crosses on the pull request. Public repositories get free minutes, and private ones have a monthly allowance depending on the plan.
Example
name: tests
on: [push, pull_request]
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: npm ci
- run: npm testWhat to say in the interview
"GitHub Actions runs automated workflows defined in YAML under .github/workflows, triggered by events like push or pull request. A typical workflow checks out the code, installs dependencies, and runs tests, with the result shown on the pull request."