This paper proposes an innovative approach to coverage path planning and obstacle avoidance for multiple Unmanned Ground Vehicles (UGVs) in a changing environment, taking into account constraints on the time, path length, number of UGVs and obstacles. Our approach leverages deformable virtual leader-follower formations to enable UGVs to adapt their formation based on both planned and real-time sensor data. A hierarchical block algorithm is employed to identify areas in the environment where UGV formations can spread out to meet time and budget constraints. Additionally, we introduce a novel control scheme that allows each UGV to generate a local steering force to dodge any static and mobile obstacles based on the closest safe angle. Results from simulations and real UGV experiments demonstrate that our approach achieves a higher coverage percentage than rule-based and reactive swarming approaches without planning. Our approach offers a promising solution for efficient coverage path planning and obstacle avoidance in complex environments with multiple UGVs.