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.
Members of Congress to keep receiving porn magazine
Rosie O'Donnell unveils nearly 50-pound weight loss