I'm in the military and can tell you with 100% guarantee that you can't attend bootcamp while pregnant. Part of the in-processing you'll go through before you go is actually a pregnancy test (they even give you one the morning that you "ship off" to be sure).
After you have the child, you can begin the process, but there will be a certain break of time before you actually go. In order to sign the paperwork to join, you'll have to show who can take care of the child while you're gone (this is actually something you have to do anyway. After you show up at your first assignment, you'll have to fill out who your alternate caregiver is if you are to get deployed.) In addition, you'll have to get yourself back in shape. At basic training, you will be doing tons of pushups, situps, running, etc and you have to meet a weight requirement.
If you have any more questions, feel free to post em and I'll try to answer them. The military is a great life.