On deformations of diagrams of commutative algebras