Use a webserver with server side includes (SSI) like nginx or apache and you can <!--# include file="/header.html" --> in the other HTML files themselves and it's all completely transparent. No need to 'build' or anything. And no complex software stack to mantain or worries about attack surfaces like with dynamic languages like php. Just the bare minimum power to do templating that hasn't changed or had issues in 20 years.