Even though this is open source it is still Licensed under the GNU Affero General Public License v3.0. So be aware.
This is the code for my public website accessible at https://newtoniano20.github.io/ .
It is built with Flask but using flask-frozen it is converted into a static website that can be hosted using Github Pages.
If not familiar with flask, checking out a tutorial before looking at the source code is recommended.
To Build and Deploy the application, using the frozen.py file, you can create a separate folder called "build", where the static files of the website will be stored. Rename this folder to "docs" so that Github Pages can access them and host the website.