The Yalkut Yosef 246:55 says:
וכן אסור למכור לגוי ספרי קודש, כמו תנ''ך וכדומה
Besikum: you can't sell holy books to gentiles.
What about online sales? Must you ask the buyer via email if he is Jewish?
We have an online ספרי קודש Store called The Jewish Bookshelf, and we received a payment from a Professor from Egypt that bought a number of religious books. We wasn't sure but the name wasn't Avraham/Ytshak/Yaakov/David... It wasn't a very jewish name.
We asked Rabbi Shlomo Chaim Hacohen Aviner, and he ruled not to sell him the books, so we refund him and said we cant send books to Egypt...
Hope it helps... Nissim.