GitHub offers us a way to publish a free website for each project with a feature called GitHub Pages. The simplest way to do this is to have a docs folder in your GitHub project. To publish your WebXR project using GitHub Pages, do the following:
- First, create a project on GitHub and clone it to your computer. The steps for this can be found in the Creating and cloning a GitHub repository recipe of chapter Chapter 8, Web Server Communication and Online Version Control.
- Build your Unity WebXR to a new folder named docs in the GitHub project folder you cloned to your computer.
- Add all the files to the current Git snapshot by typing git add in the command-line terminal.
- Create a snapshot of the added files by typing git commit -m "created docs folder" in the command-line terminal.
- Push the files from your computer up to the GitHub cloud server by typing git push in the command...