This code, except Chapter 1 (commencing with Section 20000) of Division 10, Article 2 (commencing with Section 23152) of Chapter 12 of Division 11, and Sections 25268 and 25269, does not apply to public employees and publicly owned teams, motor vehicles, and other equipment while actually engaged in work upon the surface of a highway, or work of installation, removal, repairing, or maintaining official traffic control devices. This code does apply to those persons and vehicles when traveling to or from their work.