Only run job on specific branch with GitHub Actions : <p>I'm relatively new to GitHub Actions and I have 2 jobs–one that runs my tests, and one that deploys my project onto a server.</p>

<p>Obviously I want the tests to run on every branch, but deploying should only happen when something gets pushed to master.</p>

<p>I'm struggling to find a way to run a job on a specific branch. I know it's possible to only run <em>entire workflows</em> on a specific branch, however that would mean I would have a "test" workflow and a "deploy" workflow. </p>

<p>This sounds like a solution, however they would run parallel. In an ideal world, the tests would run first, and only if they succeed, then the deploy job would start. This isn't the case when using 2 separate workflows.</p>

<p>How would I be able to achieve this? Is it possible to run <strong>jobs</strong> on a specific branch?</p>
