Yes.
Sorry to the above post, but generally no. Being a permanent resident (LPR) means you reside and work in the US. There are residency requirements to becoming a US citizen and if an LPR takes up employment abroad, upon reentry the CBP officer may determine that you have failed to maintain your residency.
Answer
Yes, if you are working for the U.S government