> ## Documentation Index
> Fetch the complete documentation index at: https://magicblock-42-dode-check-links.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Host Your Game on Github Pages

> Host your game for free using Github pages

Solana.Unity SDK is fully compatible with WebGL. In this tutorial you will compile the Solana.Unity-SDK [demo scene](https://garbles-labs.github.io/Solana.Unity-SDK/) and publish it using [Github pages](https://pages.github.com/).

With GitHub pages, GitHub allows you to host a webpage from your repository.

## Compile the game to WebGL

1. Download and Install [Unity](https://unity3d.com/get-unity/download)
2. Install the Solana.Unity-SDK following the [instructions](https://github.com/garbles-labs/Solana.Unity-SDK#installation) and import the example
3. Compile the scene to WebGL (be sure to [disable compression](https://www.youtube.com/watch?v=2jjESP58jsA), as GH pages does not support serving compressed files)
   <img src="https://mintcdn.com/magicblock-42-dode-check-links/55-Nm4Mvt46obfoV/images/webgl.png?fit=max&auto=format&n=55-Nm4Mvt46obfoV&q=85&s=2a9cf94e21e28ce48ad8f2c1188cacc8" alt="" width="1972" height="1256" data-path="images/webgl.png" />

<Card title="Skip the compilation step" icon="lightbulb" iconType="duotone">
  If you want to skip the compilation step, you can fork the SDK repository,
  which contained a pre-compiled WebGL build in the
  [gp-pages](https://github.com/garbles-labs/Solana.Unity-SDK/tree/gh-pages)
  branch
</Card>

## Host the demo on Github pages

* Create a new repository
* Navigate to the build folder containing the index.html

```shell theme={null}
git init
git add .
git commit -m "WebGL game"
git remote add origin <remote_repo_url>
git push origin <branch>
```

* You repository should now looks similar to the SDK [gp-pages](https://github.com/garbles-labs/Solana.Unity-SDK/tree/gh-pages) branch.
* Enable gh-pages deployment from the repository settings
  <img src="https://mintcdn.com/magicblock-42-dode-check-links/55-Nm4Mvt46obfoV/images/gh-pages-deply.png?fit=max&auto=format&n=55-Nm4Mvt46obfoV&q=85&s=bb14d4b6e18b216c61e164c43336b482" alt="" width="2720" height="1088" data-path="images/gh-pages-deply.png" />

Github will provide a url for the live deployment: [garbles-labs.github.io/Solana.Unity-SDK](https://garbles-labs.github.io/Solana.Unity-SDK/)

<Card title="Custom domain" icon="lightbulb" iconType="duotone">
  Learn how to setup a [custom
  domain](https://docs.github.com/en/pages/configuring-a-custom-domain-for-your-github-pages-site)
  on Github pages
</Card>

<Card title="Publish your game as xNFT" icon="lightbulb" iconType="duotone">
  Follow [this guide](/pages/tools/solana-unity-sdk/guides/publishing-a-game) to publish your game as an xNFT
  in less than 2 minutes.
</Card>

Happy game development 🎈 and don't forget to ⭐ the repo
