Israel’s government has approved a deal with Hamas for a ceasefire in Gaza, which is to begin on Sunday morning.