Skip to content

GitHub Actions Tutorials

This page collects practical workflow setup references.

Starter Flow

  1. Add a workflow file under .github/workflows/.
  2. Trigger it on pull_request or push.
  3. Check out the repository.
  4. Install dependencies.
  5. Run tests or build steps.
  6. 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.