Thanks, Gianluca and Neil, for your suggestions.
What ended up working for me was the following code:
export[notebookFile_, outputFile_] := With[
{notebook = NotebookPut[Get[notebookFile], Visible -> False]},
SetOptions[notebook, ShowCellBracket -> False, ShowCellLabel -> False];
SetOptions[#, CellOpen -> False] & /@ Cells[notebook, CellStyle -> "Input"];
Export[outputFile, NotebookGet[notebook]]
]
It hides the input cells and removes the label from the output cells, and then exports the file to PDF or HTML, based on the file extension.