I played an ability that states "Reveal the top X cards of your deck," but the number of cards in my deck was fewer than X.
In this case, can the effect still be resolved?
Yes, you can.
Reveal the remaining cards in the deck as much as possible and resolve the effect. Furthermore, even if the deck temporarily becomes 0 cards during the resolution of the effect, as long as there is 1 or more cards in the deck after the resolution finishes, you do not lose the game.
Does an On Deploy ability activate even if the card is deployed from a zone other than the hand?
Yes, it activates.
The On Deploy ability activates not only when deployed from the hand, but also when deployed from the deck, graveyard, or other zones by card effects.