Switch Cloudflare to GitHub Pages
I suddenly thought that Github Pages can be accessed directly, so I don’t need Cloudflare anymore. I can use Github Pages directly, which can save Cloudflare usage.
The content that needs to be changed is as follows:
- Remove Cloudflare’s original DNS resolution
- Set custom domain name in Github Pages
- Set Github Pages domain resolution at the domain registrar
- Add Hexo deploy configuration file, specifying the repository address of Github Pages
There are still some problems with the switch. Observe again.
Update: No problem, there is a delay in configuring the domain name, don’t switch repositories back and forth. The next step is to configure Github Actions for automatic deployment. It is currently deployed manually.
During the process of switching to Github Actions automatic deployment, I encountered various problems:
First, I had to write the workflow script. After changing several versions, the final version is as follows:
1 | # Simple workflow for deploying static content to GitHub Pages |
Then I found that my theme was wrong… I used theme-next/hexo-theme-next, which hasn’t been updated for several years. But there is a repository called next-theme/hexo-theme-next
theme-next and next-theme…
Then I changed the theme. I used the submodule method. I had to delete the original theme, and then pay attention to deleting the configuration in .git/config, and then use submodule add to add the new theme.
There is still a small problem in the theme, muse.js cannot be found, so I changed muse in schema to Pisces
Now I changed the repository name to username.github.io. I will try other repository names later and deploy Github Pages.