Assuming the owners of said building do not want you there, occupying a building is at best trespassing and at worst breaking and entering.
Civil disobedience is explicitly breaking a law because you believe it to be unjust, with the full expectation that you will be arrested and possibly punished for your actions.
When most people talk about "protesting", I don't think that's what they're talking about.