What type of hernia? If it's a hiatal hernia, then it shouldn't be a problem if it's a sliding hiatal hernia, just don't push (like weights) too much, or lay on your stomach too much, or stand/lay upside down. In other words, light exercise without much bouncing or strained pushing. Other types of hernia (such as a paraesophageal hernia or anything involving the gut) I would feel uncomfortable opining on, so I'd say "no" and ask a doctor.
I have 3 small hernias and workout everyday. I would ask your doctor, depends on how big they are. Mine are about the size of a dime. If I feel them pinching, stinging, or pulling, I just stop working out for the day.