Only Run Github Actions on Specific Branches

Keith Weaver
4 min readOct 3, 2019

The original can be found here on my personal website.

In this tutorial, we focus on running Github Actions on the push event for specific branches. This may be useful if you only want to test on feature branches and do a deployment if master. This was the use case for me. After the tests have passed, the the code review has been approved. It’s time to deploy to production. This is merging to master and running a series of steps. Github Actions makes it very simple to run specific actions/workflows on specific branches.

--

--