The Israeli government has approved a ceasefire and hostage deal with Hamas, leading to a possible end to 15 months of a devastating war in Gaza that spread to other parts of the Middle East.