Its just matter of one setting to include your file to your published version.
before publishing your website just follow this step.
right click over your file ->
theme.less
and select
properties
, then from the
build action
select
"content"
now published your website again, it will include that file to your newly published version.
Reference[
^]
if you still facing issue to access that file over web browser you just need to add MIME Types to your iis or web.cofig file
<system.webServer>
...
<staticContent>
<mimeMap fileExtension=".less" mimeType="text/css" />
</staticContent>
</system.webServer>