GitHub Actions 1 · Jobs, matrices and conditions

Run a step conditionally

Run a step only on the main branch.

- run: ./deploy.sh
  if: github.ref == 'refs/heads/main'

Official GitHub Actions 1 documentation

More jobs, matrices and conditions commands

All jobs, matrices and conditions commands · GitHub Actions 1 cheatsheet

Was this page helpful?