The Deed is usually performed in a Notary who will oversee the entire Puchase Process, verifying that all documentation is in order, that the buyer's funds are transfer correctly, etc. There are other services like "Casa Agora" where you can perform the purchasing and selling process without recourse to a Notary.
Sometimes, buyers give Power of Attorney to lawyers to legally represent them throughout the process of purchasing a property. These are then able to treat dd tax numbers, sign the sale agreement and Deed, among others. This is a very usual practice in cases whereby the buyer lives abroad and can not/does not want to go to Portugal to handle these affairs.
Following the Deed, the definitive records are altered at the Land Registry, thus making the property, the property of the new owner.
Other important steps of the Purchasing Property Process in Portugal: