Check out what happened in Acts 8: 14-17
Phillip (who is a deacon acts 6) Baptized the Samaritan. And then sent him to the Peter and John (Bishops) to recieve Confirmation.
Note that Peter and John didn’t re-baptize the Samaritan, but rather laid hands on him.
Phillip also preached to, and Baptized the Ethopian eunuch
And here is St. Isidore of Seville,
: "To the deacons it belongs to assist the priests and to minister [ministrare] in all that is done in the Sacraments of Christ, in baptism, with the Holy Chrism, to maintain the paten and chalice, to bring the oblation to the altar and to arrange them, to lay the table of the Lord and to drape it, to carry the cross, to proclaim the Gospel and Epistle, for as the charge is given to lectors to declaim the Old Testament, so it is given to deacons to proclaim the New.
To him also pertains the office of prayers (Liturgy of the Hours) and the recital of the names. It is he who gives warning to open our ears to the Lord, it is he who exhorts with his cry, it is he also who announces peace."
Trent in it’s Canon’s on Baptism, declared that even heretics could validily Baptize, as long as they used the correct matter (water) and form (Trinitarian)
Canon 4. If anyone says that the baptism which is given by heretics in the name of the Father, and of the Son, and of the Holy Ghost, with the intention of doing what the Church does, is not true baptism,[12] let him be anathema.
So the Baptism done by a deacon is certainly Valid, meaning that the Sacrament is truely imparted.
And, as Deacon Cameron kindly pointed out, the Deacon is a lawful minister of the Sacrament, the Baptism is both licit and valid.