I have a 9 mile each way commute. The way I built up stamina was by going on longer rides on the weekend. THAT made a big difference. For me, 20 miles in a single ride was a good starting point. If you want to do it gradually, you can just add a stretch of there and back from work in a direction not toward home. Start out by adding 3 miles and see how that feels. But the longer weekend rides are key.