In some cases, we have written a static interface and want to share it on the public network, but don’t want to spend a lot of money on any cloud host. What should we do? A good example would be a usage document for your development system.

Github pages

This feature helps us do that.

Setting up static Services

1. Create a static project repository

Use Github to sync your static projects to the repository you have created, but note that this is recommended:

  • .gitGit version control folder
  • docsStatic file folder (name cannot be changed arbitrarily)
  • _config.ymlGithub Pages configuration file (created automatically at Github)
  • index.mdGithub Pages default main screen (Github automatically created)
  • LICENSE
  • README.md

Github Repository screenshot:

2. Configure Github Pages

When the synchronization is complete, you can click on the projectButton to perform related configuration.

    1. Select the repository branch that opens static services
    1. Select the specified folder under the branch that opens static services
    1. Save the changes
    1. For those with domain name configuration, select the bound domain name to configure the address, for example:moas.medusasorcerer.comAnd then save

After doing this, you can see a successful deployment map similar to the one shown below:

If the access fails, please wait 30 minutes and try again. The official document says that the access can wait for about 10 branches. However, it takes a long time for me to successfully deploy each time, so I go to sleep directly after deployment and see the result in the morning tomorrow.

You can also use the Github domain name if there is no other domain name, and you don’t need to pay attention to the following content

3. Configure the Aliyun domain name

Log in to Aliyun and use the domain name management function. If you have not added domain name management, create a new domain name management:

In using domain name management add resolution mapping record, record type select CNAME, host record custom your secondary subdomain name, record value use Github solution deployed.io domain name address, the rest default.

Wait until Github deployment is complete and you can use your secondary domain name to access sites such as moas.medusasorcerer.com.

(PS: Another wave of small ads, haha ~)