If you have knockback, you might be able to yeet the creeper far enough to not damage the base.
If you don't, try to equip something that deals a lot of damage, like an axe or sharpness sword to kill it before it detonates
My entrance is sorta built into the side of a mountain, and has a fence in around the door, so knockback wouldn't be that effective because I'd still have to open the fence fates.
I can't even get knockback yet because I don't have an enchantment setup