is your spouse an HK or China citizen?
If yes, then appply for HKID, passport, and 'return home card'
If no, then have to apply for passport based on you or your spouse's nationality. Can check with your embassy's for processing time (or expedited processing). I know the US has it. then apply for visa to enter china.
I think in both cases, you should expect to stay in HK for some time. shouldn't be for more than a 2 weeks though. I have heard of people leaving HK in 1 week (but that was for mainland people).
most important thing is to get registered first at the hospital and get a certificate that says you are giving birth in HK. the hospitals in HK get crowded very fast. Only HKID holders are guaranteed space. Immigration stopped me and my wife when we reached HK. She was only allowed in because they knew she had a valid dependant visa even though she entered with travel visa. She is a mainland woman though so it could be different for other nationalities.