github actions does not bind a terminal on your jobs, and that makes emacs only runnable with --batch but it's not possible to run with -nw --eval .... --eval '(kill-emacs)'.
htmlize.el uses the current colorscheme to colorize, so running in batch mode only has very simple colors at its disposal.