Ghost do not generate static site. It has 3 different part, At core there is a JSON API. Then to manage content there is the admin app. And a front-end layer.
The themes are used for this front-end layer.
Ghost site can not be hosted on github or netlify because A Nodejs server is required to run Ghost.
You can read more about Ghost and how it’s work here.
If you wish you can use Ghost as a headless CMS. And use a static site generator to generate static site consuming data from the Ghost via API.
You can start reading here About static site generators and Ghost API here.