Divorce & Bankruptcy

So, I have a LOT of credit card debt and need to file for bankruptcy. I also need to file for divorce. Will the bankruptcy affect my husband or should I file bankruptcy after I divorce. The cards were in my name only & I don't want this to affect his house or property.