The ceasefire deal, brokered by Qatar, comes after both sides reached an agreement to end two weeks of hostilities along the border.