Properly publishing/deploying a blazor project to github pages

后端 未结 2 1384
感动是毒
感动是毒 2021-02-06 14:23

I\'ll start this by saying I\'m definitely working a bit above my paygrade here. I\'ll be doing my best to describe this problem and make it easiest to answer.

I\'ve mad

相关标签:
2条回答
  • 2021-02-06 14:54

    Looking at the current state of your gh-pages branch I'm guessing you've mixed the files that were in the publish directory with the source files from your solution? If so, you just need to clean the source files out of the gh-pages branch so only the files you copied from the publish directory are present.

    Other than that what you have now looks to be correct.

    0 讨论(0)
  • 2021-02-06 15:09

    The blazor.webassembly.js file was stored in a directory beginning with an underscore (_framework), which github's jekyll ignores when deploying the website. After adding a file named .nojekyll to the root of the repository there was still a 404 error which confused me for a very long time. It then turned out I needed to make a change to another file to cause the website to be rebuilt, finally correcting the issue.

    I still feel as though I am doing many things which could be bad practice, but that is for another day. If someone has any advice relating to that I will award the bounty for it.

    0 讨论(0)
提交回复
热议问题