jakobaxelsson / sossim

A system-of-systems (SoS) simulator
MIT License
0 stars 0 forks source link

Deploy to github pages #7

Closed jakobaxelsson closed 1 year ago

jakobaxelsson commented 1 year ago

Since the interactive application is deployed as a web site with only static pages, it should be possible to deploy it using github project pages.

The idea would basically be to copy the source directory to github pages on every commit, and then the latest version of the application can be accessed using a static link.

jakobaxelsson commented 1 year ago

I have configured github pages, so that the whole repo is copied there. To start the simulator, the link is https://jakobaxelsson.github.io/sossim/source/sossim.html. However, even though this starts loading correctly, it breaks when importing files. The error message is (PY0404): Fetching from URL mesa/__init__.py failed with error 404 (). Are your filename and path correct?. It seems that the other imported files are loaded correctly, and only this one is not. Why? Is it related to https://maximorlov.com/deploying-to-github-pages-dont-forget-to-fix-your-links/?

jakobaxelsson commented 1 year ago

The problem turned out to be that github pages does not copy files starting with underscore. By default, github pages tries to process the pages using Jekyll, and Jekyll treats files starting with underscore in a special way. To disable Jekyll, it was enough to put an empty file called .nojekyll in the top directory.