How to display plotly graph on github pages?

I did this in my repository. You need to enable Github Pages for the repo in the Settings but you donโ€™t need to use Jekyll. You can commit the output files of write_html() and push it to the repository. After that you can access the graph by using URL in format <username>.github.io/<repository>/<filepath>.

This is an example of how I configure my repo: