Nothing in the rules stops you, but your god might.
As a Cleric you have access to the full Cleric spell list to choose from whenever you prepare spells. A cleric receives power from a particular god, and this power allows them to cast any spell on the list. You or your god don't need to have a certain alignment or leaning in order to cast any given spell.
However, if you follow a god who hates the undead or imposes restrictions on your casting, you might not be allowed to cast some spells. Some gods put high value on respecting the dead and letting them rest unless you're going for a proper resurrection. An evil god might only let you cast healing magic on his followers or people who are explicitly your allies. The thing you risk should you cast such a forbidden spell is the ire of your god, which can take many forms.
Work with your DM to figure out what restrictions your god may impose. Ultimately, the DM is the arbiter of your game, and they will have to play your god. Make sure to choose a god who will be alright with the spells you want to cast. Your choice of god is generally much more important to this issue than your choice of domain, though the former will probably influence the latter.
Of course, you could end up with a laissez-faire god who doesn't care at all what spells you cast so long as you achieve their goals. If that's the case, you could cast Cure Wounds and Inflict Wounds with the same breath.
For example, I once played in a game as a Celestial Warlock who my DM treated like a Cleric. He played my god as a bit demanding, and even something as small as casting one of my racial spells (I was a Tiefling) or roleplaying being angry could end up with getting my magic taken away. This DM was used to older editions of D&D where following the rules your god set out was mechanically tied to your Cleric powers, but in 5e there's not an actual rule that says transgressions mean you get your powers taken away.
I really didn't enjoy the way my DM handled this, and if you think you would prefer it differently, you should let yours know so you can work on what's most fun for the both of you.
Either way, as I see it, you need to ask your DM this question, as their word will be final on the matter.