HTML5 build + Github pages (SOLVED)

This might be more of a git question, than a Defold question, but here goes anyways:

I’ve been having trouble, putting a HTML5 build up on Github Pages. When I push it up, it won’t start, and I get an error in the console. I did “something” (added some text to the index.html, and commited via the website), and suddenly it worked. Then I added a new line til the index.html, and commited, and now it gives the error again. I’ve used commandline, Github Desktop, and Sourcetree, and it’s the same result everytime. I also tried to upload and commit the exact same project via the web interface. It works flawlessly.

Error msg:

Links:
Broken - Run Samuel Run 0.1
Working - http://rsletta.github.io/RunSamuelRun-WEBUpload/

Hmm, not sure what’s going on there. I can’t see any obvious difference between the contents in the two folders: https://github.com/rsletta/rsletta.github.io

It usually help to sleep on it. Since the error complains about file size, i checked the size of all the archive files, and compared it to info i archive_files.json. There I made an interesting discovery. It said {"content":[{"name":"game.projectc","size":459,..., while the actual file was 431 bytes. I changed the entry in archive_files.json, and it loads. So the “broken” version now works.

The weird thing, is that the file is 459 bytes in the WEBUpload copy.

At least we found a possible solution, if that error occurs. :slight_smile:

3 Likes

Is there any way to solve this problem withouth checking size every time? I have read something about line ending and etc…

As you mentioned, you need to deal with line endings in text files (a common issue with text files in source versioning systems). Here’s a link that will help you set up your repo accordingly: https://help.github.com/articles/dealing-with-line-endings

2 Likes

Which line ending I should use?

The one recommended for your OS. If you go to the page Mathias linked it should auto-detect your OS. Follow the instructions and you should be good to go!