Preface
Due to the attack on my blog, my sense of crisis began to emerge. Although Cloudflare withstood the vast majority of it this time, there were still over 200,000 attacks that penetrated into my home data center. Once it happens, it can happen again. This time it was the blog, but it's hard to say what it will be next time (bored people who would even attack a small, run-down site like mine might do even more boring things). So I thought about it: except for applications that must be deployed inside the home data center, such as WordPress, the World of Warcraft registration website (which needs to connect to the intranet database), and other applications directly deployed via Docker, all remaining static page-type sites will be transferred to free web hosting services that I can leverage. First and foremost is thewww.tangwudi.comcorresponding navigation page.
The next question was where to move it. Originally, I wanted to use GitHub Pages directly, but for one thing, GitHub Pages requires the repository to be public. Although I don't have anything confidential here, there's no need for it to be public. Secondly, even if I set up the website using GitHub Pages, I would ultimately still need to use awww.tangwudi.comseparate domain connected to Cloudflare. In that case, I might as well just use Cloudflare Pages associated with a GitHub repository (which can also be set to private) to set it up. Moreover, the CI/CD when Cloudflare Pages is linked to a GitHub repository as the source is extremely smooth. After modifying the page locally, committing, and pushing to the corresponding GitHub repository, Cloudflare starts deploying in just a few seconds, and the changes are completed in less than a few minutes. Isn't that great?
So in the end, it was decided to only use GitHub as a repository for website page version control, while the website itself is deployed on Cloudflare Pages.
Upload the website files to the corresponding GitHub repository
First, create a repository on GitHub to store the www website files:

Next, depending on your environment, if you don't have a graphical interface, you'll have to use Git-related commands in the terminal and configure SSH, which is quite troublesome. Since I am on a Mac mini, I directly used the Mac version of GitHub Desktop.
First, clone the newly created www repository to a local folder:

Copy the website-related files directly into the directory above, and then click "Commit to main" and "Publish branch" in sequence as shown in the image below:

After a successful publish, you can see the website files in the code section of the corresponding repository on GitHub:

Deploy the website using Cloudflare Pages
Associate the GitHub account and select the corresponding repository for the website
Go to "Workers & Pages" - "Overview" - "Create application":





Build and deploy


Not done yet, continue:

At this point, it is actually already accessible via the automatically assigned third-level domain "xxx.pages.dev", but I need to access it directly using www.tangwudi.com, so we're not done yet, continue:





Done! And the access speed is noticeably faster than before (of course, that's also because I hadn't optimized access to the www site at all in the past).
Afterword
Actually, the static features provided by GitHub Pages and Cloudflare Pages themselves are relatively simple, making them more suitable for the relatively simple needs of individual users. For web developers who need more comprehensive and professional supporting features, Netlify and Vercel are more suitable. However, for my current entry-level needs, GitHub Pages and Cloudflare Pages are more than enough.
P.S. The biggest limitation of Cloudflare Pages is that it only allows 500 builds per month. Well, I doubt I'll even use it 5 times.