The growth and collapse of bubbles near deformable surfaces