Lay a 2-by-4 pressure-treated board on its narrow edge to act as a “sleeper,” meaning hidden support, for the deck. Lay a spirit level on the top of the 2-by-4. If the sleeper is out of level, scribe it to indicate where to cut it to have it lie level. Cut along your mark with a circular saw.
Place one scribed and cut sleeper every 16 inches along the length of the deck and one more for each end. Cut strips of EPDM rubber to fit under the sleepers, to pad where the sleepers meet the roof membrane.
Lay 5/4-inch deck boards across the sleepers and fasten them with two galvanized deck screws at each sleeper, much as you would attach a deck board to a regular joist on a ground-level deck.
Bolt 4-by-4 posts for the railings through the fascia board and band joist under the edge of the roof to avoid penetrations of the roof membrane. Begin by removing the soffit, the horizontal piece of plywood that runs underneath an eave, from the fascia to the wall, unscrewing its fastenings or prying them off with a nail puller. This gives you access to the rear of your post bolt to tighten its nut.
Drill with a 1/2-inch paddle bit through the post, fascia and band joist, with the post clamped at its bottom to the band joist and a spirit level along its side to indicate that it is plumb. Place a washer on a 1/2-inch galvanized lag bolt and press the bolt through the post, fascia board and band joist. Place another washer over the end of the bolt and tighten a nut with a ratchet wrench. Reinstall the fascia after you complete installation of your railing posts. Add top and bottom rails of 2-by-4 pressure-treated lumber, and balusters of 2-by-2 lumber or spindles, per a standard deck installation, to complete the deck.