How to solve cross-origin issues when hosting on GitHub Pages?

In GitHub, there are two repositories: one for the source code and another for the static site generated through GitHub Actions (xxxxx.github.io). The site is accessible via xxxxx.github.io and the CSS loads correctly.
However, after configuring a custom domain, the website opens, but the CSS fails to load properly. After initial investigation, it seems to be a cross-origin issue. Actual,I can open the Request URL.

So,How can this be resolved?
THX!

This is what I see when I visit https://www.tansha.com.cn:

That’s a strange configuration. Typically you’d have one repo and use a workflow like this:
https://gohugo.io/hosting-and-deployment/hosting-on-github/

Oh, I really appreciate your help! I’ll try to solve it based on what you mentioned. Thank you!

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.