How can I determine which command / step failed within a travis build
Look at the Travis CI Logs.  Often a failed build step will return "Error", "Failure", "-1", buried in a wall of text.  If you want a better way to collect and  these logs you can check out the following:


Official Github page with details on how log collection works
An official blog on how to structure your production logs.