Miley (7-8) won for the third time in four starts, taking a shutout into the seventh inning and surviving 7 2/3. He walked three and struck out four.
Brad Ziegler, installed by the Diamondbacks as their closer earlier this week, allowed a hit in the ninth before picking up his fifth save.
Carlos Villanueva (2-7) was charged with the loss after giving up all three runs on six hits in five innings.
NBC reportedly holds celebs hostage to Jimmy Fallon's show
Boston schools pull out free condoms over wrapping complaints