路径 B(中国大陆):用阿里云 ESA 发布
本课时暂无中文译文,以下内容为英文原文。
Draft: this lesson is an outline and will be expanded.
This is Path B, for readers in mainland China, where some foreign services can be slow or unreachable. Alibaba Cloud ESA is a service that serves your site from computers close to visitors. You keep your code on GitHub and build the finished files on the gh-pages branch, as in the previous lesson, and ESA serves what is on that branch.
Alibaba Cloud changes its pages from time to time. Follow its current instructions and use your AI assistant to read them with you.
What you will do
- Create an Alibaba Cloud account. Real-name verification is required, which means proving your identity with official documents. It can take some time, so start it early. Keep the password private.
- Ask your AI assistant: “I have a
gh-pagesbranch with a file calledesa.jsoncand adistfolder. What do I need to enter in Alibaba Cloud ESA to serve it?” Compare the answer with what the console currently shows. - Create a site in the console and connect your GitHub repository and the
gh-pagesbranch. - Open
esa.jsoncin the branch and check that it names your site and serves./dist. - Start the first publication and open the address the service gives you.
- Push a small change, wait for the run to finish, and check that the new text appears.
Check what the service charges before you enable anything that is not free. Do not put an access key in your repository.
Check yourself
- Your site opens from the address ESA gives you.
- ESA reads the
gh-pagesbranch, and a new push changes the site. - You know that real-name verification came first and can say why it takes time.