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
- Test across versions
- Run jobs in order
- Run a step after a failure
- Cancel outdated runs
- Start a database for tests
- Pass data between jobs
All jobs, matrices and conditions commands · GitHub Actions 1 cheatsheet