A woman recently was reported in the news to have run a marathon at full term. She was monitored by her obstetrician and delivered shortly after crossing the finish line.
The answer to your question is going to be determined by your individual condition. If you are fit enough, you can do any exercise
you want after you check it out with your obstetrician. If you're fatigued or in pain, stop.