A sample HTML file called testpage2 in the root:

layout: test_layout
sidebar: false
sitemap: false
this is some test page content
<span class="myspan">Failed Static Page</span>
    .myspan {color:red;}
    .TADA {color:green;}
<script type="text/javascript">
        const myElements = document.querySelectorAll(".myspan");

        // sample comment. if source removes all CR/LF chars, the next code segment won't run!
        myElements.forEach((myElement, index) => {
            myElement.innerText = "success!"
            myElement.className = "TADA"
  see https://github.com/jekyll/jekyll/issues/8660

This will deploy to the ../testpage2/ directory, and NOT testpage2.html as one might expect.

Note the layout called test_layout: this is found in the _layouts directory and is called test_layout.html