GitHub Pages
GitHub Pages only serves the files in the repo. It will not run PHP, and it will not accept a form POST. The form has to post somewhere else. That is the form backend.
<form action="https://smote.sh/f/FORM_ID" method="POST"> <input name="email" type="email" required> <textarea name="message" required></textarea> <input type="hidden" name="_redirect" value="https://yoursite.com/thanks"> <button>Send</button> </form>
Plain HTML: put the form in index.html or contact.html. Jekyll on Pages: drop it in _includes/contact.html and {% include contact.html %} from a page. No plugin. Pages’ plugin safelist does not matter because nothing runs on GitHub after deploy.
An Action that emails you is another backend you have to keep. smote is one action URL. Create it in the dashboard, replace FORM_ID, push. Works on username.github.io and project pages.
Also: Hugo · Astro · Jekyll · Cloudflare Pages · Any static site