Thank you for your comment.
At the end of the section "Making templated HTML using Google Apps Script" there are links to finished files. Compare them with your version.
Secondly, it is possible that you didn't save Index.html file after editing, and then you did deployment without saving the file. In this case modifications from the file will not be implemented.