DH, who has more than a little expertise in the area of employment and human resources, offers some excellent advice in this age of purges:
Make them fire you. If you resign under pressure you have basically no legal standing. Make. Them. Fire. You. If they pressure you to resign, you should write a letter, declining to resign, declining to take any responsibility for your private, off-duty, speech and/or actions. Specifically point out that you are exercising your personal discretion to engage in political and social commentary regarding current events, that you are not willing to be subjected to a hostile work environment for your unorthodox political views, and that you are not willing to explain or defend or justify those personal political views.
Always make them do their own dirty work.
Most of the time, employment purges are not legal. If you are being pressured to resign, that is in itself a de facto admission that they know they can’t fire you. Of course, none of this will prevent you from getting blackballed when applying for a new job, which is why it is wise to always use an untraceable pseudonym on the Internet and to avoid social media.
It will be used against you, somehow, by someone. Whether or not that is fair and desirable is irrelevant. Those are the new rules of the game. Master them and play by them. Play by them ruthlessly and remember that the Left tends to be far more careless about these things than the Right because they assume their positions are beyond criticism.