GitHub Actions Tutorials
This page collects practical workflow setup references.
Starter Flow
- Add a workflow file under
.github/workflows/. - Trigger it on
pull_requestorpush. - Check out the repository.
- Install dependencies.
- Run tests or build steps.
- Publish artifacts or deploy if the branch policy allows it.
Minimal Workflow
name: CI
on:
push:
branches: [main]
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: npm ci
- run: npm test
Useful References
Practical Notes
- Keep credentials in repository secrets.
- Reuse workflows when multiple repositories need the same pipeline shape.
- Prefer branch-protected deployment jobs for production releases.